Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Create mosaïc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DISCO Beamline
Create mosaïc
Commits
551d1f03
Commit
551d1f03
authored
Feb 6, 2023
by
Hugo CHAUVET
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug for non-mosaic acquisition
parent
711721ec
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ImageJ/script_mosaic_telemos.py
+8
-4
8 additions, 4 deletions
ImageJ/script_mosaic_telemos.py
ImageJ/utils/IJmmlib.py
+1
-1
1 addition, 1 deletion
ImageJ/utils/IJmmlib.py
ImageJ/utils/mmlib.py
+11
-2
11 additions, 2 deletions
ImageJ/utils/mmlib.py
with
20 additions
and
7 deletions
ImageJ/script_mosaic_telemos.py
+
8
−
4
View file @
551d1f03
...
@@ -450,7 +450,11 @@ def process_tiles(implus_tiles_stack, channel, z, implus_white_corr, implus_dark
...
@@ -450,7 +450,11 @@ def process_tiles(implus_tiles_stack, channel, z, implus_white_corr, implus_dark
for
tile
in
xrange
(
Ntiles
):
for
tile
in
xrange
(
Ntiles
):
IJ
.
showProgress
(
tile
+
1
,
Ntiles
)
IJ
.
showProgress
(
tile
+
1
,
Ntiles
)
IJ
.
log
(
'
Compute %i / %i
'
%
(
tile
+
1
,
Ntiles
))
IJ
.
log
(
'
Compute %i / %i
'
%
(
tile
+
1
,
Ntiles
))
if
Ntiles
>
1
:
data_views
=
Views
.
hyperSlice
(
data
,
2
,
tile
)
data_views
=
Views
.
hyperSlice
(
data
,
2
,
tile
)
else
:
data_views
=
data
opsus
=
sub
(
data_views
,
dark
)
opsus
=
sub
(
data_views
,
dark
)
# FOR DEGUG: op[cpt] = sub(data_views, dark)
# FOR DEGUG: op[cpt] = sub(data_views, dark)
op
[
cpt
]
=
IF
(
GT
(
opsus
,
0.0
),
THEN
(
div
(
opsus
,
white
)),
ELSE
(
0.0
))
op
[
cpt
]
=
IF
(
GT
(
opsus
,
0.0
),
THEN
(
div
(
opsus
,
white
)),
ELSE
(
0.0
))
...
...
This diff is collapsed.
Click to expand it.
ImageJ/utils/IJmmlib.py
+
1
−
1
View file @
551d1f03
...
@@ -28,7 +28,7 @@ def load_mm_images(rootdir, roi=1, tile=True, pos=False,
...
@@ -28,7 +28,7 @@ def load_mm_images(rootdir, roi=1, tile=True, pos=False,
if
not
tile
and
pos
:
if
not
tile
and
pos
:
stack_order
=
[
'
position
'
,
'
time
'
,
'
z
'
,
'
channels
'
]
stack_order
=
[
'
position
'
,
'
time
'
,
'
z
'
,
'
channels
'
]
image_files
=
generate_file_list
(
metadata
,
roi
,
tile
,
pos
,
stack_order
)
image_files
=
generate_file_list
(
metadata
,
rootdir
,
roi
,
tile
,
pos
,
stack_order
)
# Create the virtual stack
# Create the virtual stack
vstack
=
VirtualStack
(
dimensions
[
'
width
'
],
dimensions
[
'
height
'
],
None
,
rootdir
)
vstack
=
VirtualStack
(
dimensions
[
'
width
'
],
dimensions
[
'
height
'
],
None
,
rootdir
)
...
...
This diff is collapsed.
Click to expand it.
ImageJ/utils/mmlib.py
+
11
−
2
View file @
551d1f03
...
@@ -195,7 +195,7 @@ def get_stage_positions_labels(metadata):
...
@@ -195,7 +195,7 @@ def get_stage_positions_labels(metadata):
return
stage_label
return
stage_label
def
generate_file_list
(
metadata
,
roi
=
1
,
tile
=
True
,
pos
=
False
,
stack_order
=
None
):
def
generate_file_list
(
metadata
,
rootdir
,
roi
=
1
,
tile
=
True
,
pos
=
False
,
stack_order
=
None
):
"""
"""
Generate a list of all images to load from the metadata
Generate a list of all images to load from the metadata
...
@@ -228,6 +228,15 @@ def generate_file_list(metadata, roi=1, tile=True, pos=False, stack_order=None):
...
@@ -228,6 +228,15 @@ def generate_file_list(metadata, roi=1, tile=True, pos=False, stack_order=None):
else
:
else
:
pre_folder
=
'
Default
'
# Is redefined
pre_folder
=
'
Default
'
# Is redefined
# Test if the folder delfault is present
# Test the name of root folder for images
if
rootdir
is
not
None
:
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
rootdir
,
'
Default
'
)):
if
os
.
path
.
isdir
(
os
.
path
.
join
(
rootdir
,
'
Pos0
'
)):
pre_folder
=
'
Pos0
'
else
:
print
(
'
No folder found !
'
)
# Get the combination of all conditions of acquisitions
# Get the combination of all conditions of acquisitions
all_conditions
,
ordered_keys
=
groups_dimensions
(
metadata
,
roi
,
stack_order
)
all_conditions
,
ordered_keys
=
groups_dimensions
(
metadata
,
roi
,
stack_order
)
...
@@ -247,7 +256,7 @@ def generate_file_list(metadata, roi=1, tile=True, pos=False, stack_order=None):
...
@@ -247,7 +256,7 @@ def generate_file_list(metadata, roi=1, tile=True, pos=False, stack_order=None):
min_pos_index
=
0
min_pos_index
=
0
if
pos
:
if
pos
:
#
Define the pre_folder
#
Define the pre_folder
pre_folder
=
'
Pos{i}
'
.
format
(
i
=
group
[
ordered_keys
.
index
(
'
position
'
)])
pre_folder
=
'
Pos{i}
'
.
format
(
i
=
group
[
ordered_keys
.
index
(
'
position
'
)])
base_fmt
=
fmtMM2
.
format
(
filter
=
group
[
ordered_keys
.
index
(
'
channels
'
)],
base_fmt
=
fmtMM2
.
format
(
filter
=
group
[
ordered_keys
.
index
(
'
channels
'
)],
...
...
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