Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
The problem appears to be due to the colors in the file being indexed from 1 rather than 0, this lead to a null entry in the arraylist. Removing the empty entry allows for the file to read without exception.
To test, use the sample file in the Zenodo link
Without this PR attampting to initiate the file should result in an exception as below
With the PR the file should be read without the exception and the images display as expected
at loci.formats.in.ImarisHDFReader.initFile(ImarisHDFReader.java:413)
at loci.formats.FormatReader.setId(FormatReader.java:1480)
at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:498)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:141)
at loci.plugins.in.Importer.showDialogs(Importer.java:156)
at loci.plugins.in.Importer.run(Importer.java:77)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:244)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:70)
at java.lang.Thread.run(Thread.java:748)
Issue was raised on forum thread https://forum.image.sc/t/how-to-open-ims-files-with-fiji/29907/12 A sample file was provided on https://zenodo.org/records/11203497 and can be used for testing
The problem appears to be due to the colors in the file being indexed from 1 rather than 0, this lead to a null entry in the arraylist. Removing the empty entry allows for the file to read without exception.
To test, use the sample file in the Zenodo link