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
7003049f
Commit
7003049f
authored
2 years ago
by
Kai Schleicher
Browse files
Options
Downloads
Patches
Plain Diff
fix bug that expected a certain channel sequence
changed result table column and file naming accordingly
parent
0432dccf
Branches
fix-path-handling
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
2c_fibertyping.py
+14
-14
14 additions, 14 deletions
2c_fibertyping.py
with
14 additions
and
14 deletions
2c_fibertyping.py
+
14
−
14
View file @
7003049f
...
...
@@ -409,7 +409,7 @@ all_fiber_subsets =[ [], [], [] ]
for
index
,
fiber_channel
in
enumerate
(
all_fiber_channels
):
if
fiber_channel
>
0
:
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel
)
+
"
positive (
"
+
roi_colors
[
fiber_channel
-
1
]
+
"
)
"
,
"
NO
"
)
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel
)
+
"
positive (
"
+
roi_colors
[
index
]
+
"
)
"
,
"
NO
"
)
if
all_min_fiber_intensities
[
index
]
==
0
:
all_min_fiber_intensities
[
index
]
=
get_threshold_from_method
(
raw
,
fiber_channel
,
"
Mean
"
)[
0
]
IJ
.
log
(
"
fiber channel
"
+
str
(
fiber_channel
)
+
"
intensity threshold:
"
+
str
(
all_min_fiber_intensities
[
index
])
)
...
...
@@ -418,7 +418,7 @@ for index, fiber_channel in enumerate(all_fiber_channels):
if
len
(
positive_fibers
)
>
0
:
change_subset_roi_color
(
rm
,
positive_fibers
,
roi_colors
[
index
])
save_selected_rois
(
rm
,
positive_fibers
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
"
+
str
(
fiber_channel
)
+
"
.zip
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel
)
+
"
positive (
"
+
roi_colors
[
fiber_channel
-
1
]
+
"
)
"
,
positive_fibers
,
"
YES
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel
)
+
"
positive (
"
+
roi_colors
[
index
]
+
"
)
"
,
positive_fibers
,
"
YES
"
)
# single positive
positive_c1
=
all_fiber_subsets
[
0
]
...
...
@@ -433,28 +433,28 @@ positive_c1_c2_c3 = list( set(positive_c1_c2).intersection(all_fiber_subsets[2])
# update ROI color & results table for double and triple positives
if
len
(
positive_c1_c2
)
>
0
:
preset_results_column
(
rt
,
"
channel
1,2
positive (magenta)
"
,
"
NO
"
)
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_2
)
+
"
positive (magenta)
"
,
"
NO
"
)
change_subset_roi_color
(
rm
,
positive_c1_c2
,
"
magenta
"
)
save_selected_rois
(
rm
,
positive_c1_c2
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
1_c2
.zip
"
)
add_results
(
rt
,
"
channel
1,2
positive (magenta)
"
,
positive_c1_c2
,
"
YES
"
)
save_selected_rois
(
rm
,
positive_c1_c2
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
"
+
str
(
fiber_channel_1
)
+
"
_c
"
+
str
(
fiber_channel_2
)
+
"
.zip
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_2
)
+
"
positive (magenta)
"
,
positive_c1_c2
,
"
YES
"
)
if
len
(
positive_c1_c3
)
>
0
:
preset_results_column
(
rt
,
"
channel
1,3
positive (yellow)
"
,
"
NO
"
)
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive (yellow)
"
,
"
NO
"
)
change_subset_roi_color
(
rm
,
positive_c1_c3
,
"
yellow
"
)
save_selected_rois
(
rm
,
positive_c1_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
1_c3
.zip
"
)
add_results
(
rt
,
"
channel
1,3
positive (yellow)
"
,
positive_c1_c3
,
"
YES
"
)
save_selected_rois
(
rm
,
positive_c1_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
"
+
str
(
fiber_channel_1
)
+
"
_c
"
+
str
(
fiber_channel_3
)
+
"
.zip
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive (yellow)
"
,
positive_c1_c3
,
"
YES
"
)
if
len
(
positive_c2_c3
)
>
0
:
preset_results_column
(
rt
,
"
channel
2,3
positive (cyan)
"
,
"
NO
"
)
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel_2
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive (cyan)
"
,
"
NO
"
)
change_subset_roi_color
(
rm
,
positive_c2_c3
,
"
cyan
"
)
save_selected_rois
(
rm
,
positive_c2_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
2_c3
.zip
"
)
add_results
(
rt
,
"
channel
2,3
positive (cyan)
"
,
positive_c2_c3
,
"
YES
"
)
save_selected_rois
(
rm
,
positive_c2_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
"
+
str
(
fiber_channel_2
)
+
"
_c
"
+
str
(
fiber_channel_3
)
+
"
.zip
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel_2
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive (cyan)
"
,
positive_c2_c3
,
"
YES
"
)
if
len
(
positive_c1_c2_c3
)
>
0
:
preset_results_column
(
rt
,
"
channel
1,2,3
positive
(white)
"
,
"
NO
"
)
preset_results_column
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_2
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive(white)
"
,
"
NO
"
)
change_subset_roi_color
(
rm
,
positive_c1_c2_c3
,
"
white
"
)
save_selected_rois
(
rm
,
positive_c1_c2_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
1_c2_c3
.zip
"
)
add_results
(
rt
,
"
channel
1,2,3
positive
(white)
"
,
positive_c1_c2_c3
,
"
YES
"
)
save_selected_rois
(
rm
,
positive_c1_c2_c3
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_positive_fiber_rois_c
"
+
str
(
fiber_channel_1
)
+
"
_c
"
+
str
(
fiber_channel_2
)
+
"
_c
"
+
str
(
fiber_channel_3
)
+
"
.zip
"
)
add_results
(
rt
,
"
channel
"
+
str
(
fiber_channel_1
)
+
"
,
"
+
str
(
fiber_channel_2
)
+
"
,
"
+
str
(
fiber_channel_3
)
+
"
positive(white)
"
,
positive_c1_c2_c3
,
"
YES
"
)
# save all results together
save_all_rois
(
rm
,
output_dir
+
"
/
"
+
raw_image_title
+
"
_all_fiber_type_rois_color-coded.zip
"
)
...
...
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