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
106d690d
Commit
106d690d
authored
2 weeks ago
by
Kai Schleicher
Browse files
Options
Downloads
Patches
Plain Diff
Remove sum projection as data is a 2D MIP
parent
9a094bcc
No related branches found
Branches containing commit
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
+7
-8
7 additions, 8 deletions
2d_spots_in_fibers.py
with
7 additions
and
8 deletions
2d_spots_in_fibers.py
+
7
−
8
View file @
106d690d
...
...
@@ -776,16 +776,15 @@ results_table = ResultsTable()
for
index
,
channel
in
enumerate
(
processing_channels
):
channel
=
int
(
channel
)
quality_threshold
=
float
(
quality_thresholds
[
index
])
spots_channel
=
BFopen_image
(
path_to_image
,
channel
,
series_number
)
# can be a stack
spots_label_imp
=
run_trackmate_dog_spot_detector
(
spots_channel
,
quality_threshold
)
# spot detection is 3D
spots_channel
=
BFopen_image
(
path_to_image
,
channel
,
series_number
)
spots_label_imp
=
run_trackmate_dog_spot_detector
(
spots_channel
,
quality_threshold
)
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
)
# can be a stack
spots_binary_imp_sum_proj
=
ZProjector
.
run
(
spots_binary_imp
,
"
sum
"
)
# if 2 (n) spots perfecly overlap in z, the pixel value will be 2 (n)
dapi_positive_spots_binary
=
ImageCalculator
.
run
(
spots_binary_imp_sum_proj
,
dapi_binary
,
"
Multiply create
"
)
dapi_negative_spots_binary
=
ImageCalculator
.
run
(
spots_binary_imp_sum_proj
,
dapi_positive_spots_binary
,
"
Subtract create
"
)
spots_binary_imp
=
convert_labelimage_to_binary
(
spots_label_imp
)
dapi_positive_spots_binary
=
ImageCalculator
.
run
(
spots_binary_imp
,
dapi_binary
,
"
Multiply create
"
)
dapi_negative_spots_binary
=
ImageCalculator
.
run
(
spots_binary_imp
,
dapi_positive_spots_binary
,
"
Subtract create
"
)
n_spots_per_fiber
=
measure_intensity_sum
(
fibers_label_imp
,
spots_binary_imp
_sum_proj
)
n_spots_per_fiber
=
measure_intensity_sum
(
fibers_label_imp
,
spots_binary_imp
)
n_dapi_positive_spots_per_fiber
=
measure_intensity_sum
(
fibers_label_imp
,
dapi_positive_spots_binary
)
n_dapi_negative_spots_per_fiber
=
measure_intensity_sum
(
fibers_label_imp
,
dapi_negative_spots_binary
)
...
...
@@ -794,7 +793,7 @@ for index, channel in enumerate(processing_channels):
add_results_to_resultstable
(
results_table
,
"
n spots channel
"
+
str
(
channel
),
n_spots_per_fiber
[
1
])
add_results_to_resultstable
(
results_table
,
"
n spots dapi positive channel
"
+
str
(
channel
),
n_dapi_positive_spots_per_fiber
[
1
])
add_results_to_resultstable
(
results_table
,
"
n spots dapi negative channel
"
+
str
(
channel
),
n_dapi_negative_spots_per_fiber
[
1
])
close_images
([
spots_channel
,
spots_label_imp
,
spots_binary_imp
,
spots_binary_imp
_sum_proj
,
dapi_binary
,
dapi_positive_spots_binary
,
dapi_negative_spots_binary
])
close_images
([
spots_channel
,
spots_label_imp
,
spots_binary_imp
,
spots_binary_imp
,
dapi_binary
,
dapi_positive_spots_binary
,
dapi_negative_spots_binary
])
results_table
.
show
(
"
Spots
"
)
save_results_table
(
results_table
,
filename
,
"
Spots
"
,
parent_dir
)
...
...
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