Skip to content
Snippets Groups Projects
Commit 170d69c7 authored by Hugo CHAUVET's avatar Hugo CHAUVET :bicyclist:
Browse files

Replace script_mosaic_telemos.py correct bug MM2 multi-roi

parent 0f012aa1
Branches
No related tags found
1 merge request!3Dev
......@@ -180,14 +180,16 @@ def load_image_tiles_stack(images_dir):
else:
selected_roi = roinum[0]
# Load all files for the selected ROI
directory = os.path.join(os.path.abspath(d), name_pattern % (selected_roi)+'*')
# files = glob.glob(directory)
base_dir = os.path.abspath(d)
metadata = load_metadata(base_dir)
metadata = load_metadata(os.path.join(base_dir, name_pattern % (selected_roi)+'1', 'metadata.txt'))
# Simple regexp to find tile numbers roi1_tileXX
if format == 'SE':
# Find the smallest tile number for this roi
hstack, good_names = load_mm_images(base_dir, roi=selected_roi, return_filenames=True)
if format == 'CG':
......@@ -201,7 +203,7 @@ def load_image_tiles_stack(images_dir):
def load_images(images_dir, roi=None, virtual=False):
d = os.path.abspath(images_dir)
imp = load_mm_images(d, tile=False)
imp = load_mm_images(d, roi=None, tile=False)
if roi is not None and len(roi) == 4 and imp.width > roi[2] and imp.height > roi[3]:
IJ.log('Roi %s on image size (%i, %i)' % (str(roi[2])+','+str(roi[3]), imp.width, imp.height))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment