Tiff stack handling #42
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for multi-page TIFF files to the image stitcher workflow. The implementation introduces a
new parse_multipage_tiff()method inStitchingComputedParametersthat detects multi-page TIFF files containing "stack" in their filenames and parses them using thetifffilelibrary.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.