Skip to content

Conversation

@maragall
Copy link
Collaborator

This pull request adds support for multi-page TIFF files to the image stitcher workflow. The implementation introduces a new parse_multipage_tiff() method in StitchingComputedParameters that detects multi-page TIFF files containing "stack" in their filenames and parses them using the tifffile library.

The method extracts individual pages from each multi-page TIFF file, maps them to z-levels and channels based on the coordinates.csv file, and creates AcquisitionMetadata objects with a new frame_idx field to track the page index within each file. The stitcher's load_image() method has been updated to handle both single files and multi-page TIFF files by checking for the frame_idx attribute and using tifffile to read specific pages when needed.

The GUI now automatically detects the acquisition format and displays whether it's using multi-page TIFF or individual files in the directory drop area. The format detection is performed by checking for "_stack" files in the first timepoint directory, and the parsing logic automatically chooses between the original parse_acquisition_metadata() method for individual files or the new parse_multipage_tiff() method for multi-page TIFF files.

@hongquanli hongquanli merged commit 1f17941 into Cephla-Lab:main Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants