-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Micromanager: fix multi-file image stacks and dimensionorder #2475
Conversation
Previously the DimensionOrder was unconditionally set to XYZCT causing Position.getFile() to potentially return a mismatching file. In the case of multi-file multidimensional datasets, the IFDs for the same file were parsed again for positions causing an array overflow.
The code changes here look fine and I can reproduce and see the fixes in the plane metadata for incorrect ordering. I am unable to reproduce the ArrayIndexOutOfBoundsException though when using the dataset from http://downloads.openmicroscopy.org/images/Micro-Manager/1.4.22/sebastien/ or samples from curated. Am I testing with the wrong filesets? |
@dgault: to reproduce the exception, you could either use the 5.1.10 command-line tools (you might have to up
|
Ah that makes sense now, I wasn't pointing to the txt file. I can now reproduce the ArrayIndexOutOfBoundsException on 5.1.10 and verify that it is no longer present with this PR in place. I've also retested the Plane metadata on curated/micromanager/nico/Untitled_4_multi_file and can confirm that it has been updated correctly. Lastly the images also display as expected. PR should be good to merge. |
hi sebastien, thanks, |
Hi Thomas, The Fiji updater at the moment only supports 5.1 builds. If you wish to test this you can download the latest 5.2 build from http://downloads.openmicroscopy.org/bio-formats/5.2.0-m5/ To update Fiji you will need to replace the jars in the folder jars/bioformats and the bio-formats_plugins.jar under the plugins directory. Note: The 5.2 builds are still in internal development and are not fully supported David |
Fixes #2308
This Pull Request fixes the
MicroManagerReader
reader to handle large datasets saved as image stack and split over multiple files (i.e. datasets larger than 4GB). While testing a sample dataset, a second issue was fixed by improving the way each image dimensionality is parsed from the metadata file.Summary of changes
parsePosition()
, the number of IFDs were added to the current plane at the end of each loop as well as in the call toparseKeyValue()
causing anArrayIndexOutOfBoundsException
when dealing with multiple filesdimensionOrder
was previously unconditionally set toXYZCT
causing wrong files to be returned byPosition.getFile()
under some conditions. For the sample multi-file dataset, this causedparsePosition()
to scan twice the IFDs of the same file andparseKeyValue()
to fail with anArrayIndexOutOfBoundsException
. Instead we make use of theSlicesFirst
metadata value as documented in https://micro-manager.org/wiki/Micro-Manager_File_Formats#Writing_Images to store the correctDimensionOrder
Testing
In addition to the existing datasets available under
curated/micromanager
, a new large fileset was generated using Micro-Manager 1.4.22 with the demo config with 3 channels, 21 z-sections and 140 timepoints composed of 2 OME-TIFF files and a metadata text file. This fileset will be migrated to thepublic
folder and be available under http://downloads.openmicroscopy.org/images/Micro-Manager/1.4.22/.This fileset should fail to open without this PR and open properly with this PR included with the dimensions indicated above (might require to bump the default memory if using the command-line tools). Additionally, the OMERO workflow should be tested as the fileset should be importable and viewable.
The configuration files for a couple of filesets will be updated separately to match the
DimensionOrder
changes described above. Some attention should be put oncurated/micromanager/nico/Untitled_4_multi_file/
where thePlane
metadata was previously incorrectly populated and should now be fixed by this change. The expected deltaT and position value can be checked using Micro-Manager.