Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
myosoft-imcf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
imcf
myosoft-imcf
Commits
2c6afe8e
Commit
2c6afe8e
authored
1 month ago
by
Kai Schleicher
Browse files
Options
Downloads
Patches
Plain Diff
Remove RoiManager import, get from script parameter instead.
parent
d34dc6c3
No related branches found
No related tags found
1 merge request
!2
Initial commit
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
2d_spots_in_fibers.py
+4
-12
4 additions, 12 deletions
2d_spots_in_fibers.py
with
4 additions
and
12 deletions
2d_spots_in_fibers.py
+
4
−
12
View file @
2c6afe8e
...
...
@@ -18,7 +18,6 @@ from fiji.plugin.trackmate.action import LabelImgExporter
# ij imports
from
ij
import
IJ
from
ij.plugin
import
ImageCalculator
from
ij.plugin.frame
import
RoiManager
from
ij.measure
import
ResultsTable
from
ij.measure
import
Measurements
as
M
from
ij.plugin.filter
import
Analyzer
...
...
@@ -386,7 +385,7 @@ def save_results_table(results_table, filename, suffix, target):
results_table
.
save
(
savepath
)
def
save_labelimage_as_ijroiset
(
label_imp
,
filename
,
suffix
,
target
):
def
save_labelimage_as_ijroiset
(
label_imp
,
rm
,
filename
,
suffix
,
target
):
"""
Save all labels i a label Images as IJ-ROIset to target location.
Only 2D, requires PTBIOP update site.
...
...
@@ -401,10 +400,6 @@ def save_labelimage_as_ijroiset(label_imp, filename, suffix, target):
target : str
the target directory in which to save the table
"""
rm
=
RoiManager
.
getInstance
()
if
not
rm
:
rm
=
RoiManager
()
rm
.
reset
()
command
.
run
(
Labels2Rois
,
False
,
'
imp
'
,
label_imp
,
'
rm
'
,
rm
).
get
()
savename
=
filename
+
"
_
"
+
str
(
suffix
)
+
"
.zip
"
savepath
=
os
.
path
.
join
(
target
,
savename
)
...
...
@@ -412,19 +407,16 @@ def save_labelimage_as_ijroiset(label_imp, filename, suffix, target):
rm
.
reset
()
def
load_rois_from_zip
(
path
):
def
load_rois_from_zip
(
path
,
rm
):
"""
Load ROIs from the given zip file and add them to the RoiManager.
Parameters
----------
path : string
Path to the ROI zip file.
rm : RoiManager
The ROI Manager.
"""
rm
=
RoiManager
.
getInstance
()
if
not
rm
:
rm
=
RoiManager
()
rm
.
reset
()
rm
.
runCommand
(
"
Open
"
,
path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment