ome / bioformats

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.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
370 stars 241 forks source link

Imaris: Remove empty color entries for non 0 indexed colors #4193

Open dgault opened 3 weeks ago

dgault commented 3 weeks ago

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

    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)
imagesc-bot commented 3 weeks ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/how-to-open-ims-files-with-fiji/29907/18