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
d34dc6c3
Commit
d34dc6c3
authored
2 weeks ago
by
Kai Schleicher
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused function, its execution and associated import
parent
0b133811
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
+3
-19
3 additions, 19 deletions
2d_spots_in_fibers.py
with
3 additions
and
19 deletions
2d_spots_in_fibers.py
+
3
−
19
View file @
d34dc6c3
...
...
@@ -30,7 +30,7 @@ from loci.formats import ImageReader, MetadataTools, Memoizer
# MorpholibJ imports
from
inra.ijpb.binary
import
BinaryImages
# BIOP imports
from
ch.epfl.biop.ij2command
import
Labels2Rois
,
Rois2Labels
from
ch.epfl.biop.ij2command
import
Labels2Rois
# python imports
import
os
...
...
@@ -330,7 +330,7 @@ def measure_intensity_sum(imp, rm):
Example
-------
>>>
labels
,
intensities
=
measure_intensity_sum
(
im
age
,
roi_manager
)
>>>
labels
,
intensities
=
measure_intensity_sum
(
im
p
,
roi_manager
)
"""
rt_
=
ResultsTable
()
...
...
@@ -428,17 +428,6 @@ def load_rois_from_zip(path):
rm
.
runCommand
(
"
Open
"
,
path
)
def
convert_rois_to_labelimage
(
imp
):
rm
=
RoiManager
.
getInstance
()
if
not
rm
:
rm
=
RoiManager
()
label_imp
=
command
.
run
(
Rois2Labels
,
False
,
'
imp
'
,
imp
,
'
rm
'
,
rm
).
get
().
getOutput
(
"
label_imp
"
)
rm
.
reset
()
# TODO: should be optional but can be default
return
label_imp
def
close_images
(
list_of_imps
):
"""
Close given ImagePlus images
...
...
@@ -468,11 +457,6 @@ if threshold <= 0:
threshold
=
get_threshold_from_method
(
dapi_channel
,
"
otsu
"
)
dapi_binary
=
convert_to_binary
(
dapi_channel
,
threshold
)
# Get the fiber segmentation from ij roizip and convert to labelimage
load_rois_from_zip
(
fiber_segmentation_roiset
)
fibers_label_imp
=
convert_rois_to_labelimage
(
dapi_channel
)
dapi_channel
.
close
()
# detect spots and count them per fiber
results_table
=
ResultsTable
()
for
index
,
channel
in
enumerate
(
processing_channels
):
...
...
@@ -480,7 +464,7 @@ for index, channel in enumerate(processing_channels):
quality_threshold
=
float
(
quality_thresholds
[
index
])
spots_channel
=
BFopen_image
(
path_to_image
,
channel
,
series_number
)
spots_label_imp
=
run_trackmate_dog_spot_detector
(
spots_channel
,
spot_diameter
,
quality_threshold
)
save_image_as_IJtif
(
spots_label_imp
,
filename
,
"
spots_ch
"
+
str
(
channel
),
parent_dir
)
#
save_image_as_IJtif(spots_label_imp, filename, "spots_ch" + str(channel), parent_dir)
save_labelimage_as_ijroiset
(
spots_label_imp
,
filename
,
"
spots_ch
"
+
str
(
channel
),
parent_dir
)
spots_binary_imp
=
convert_labelimage_to_binary
(
spots_label_imp
)
dapi_positive_spots_binary
=
ImageCalculator
.
run
(
spots_binary_imp
,
dapi_binary
,
"
Multiply create
"
)
...
...
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