Error when importing multiple .czi images series using "Group files with similar names"

Hi,

I´m trying to import and stack multiple .czi files (each one containing between 4 and 6 tiles and 2 colour channels) using the “Group files with similar names” and “Concatenate series when compatible” function. Then Bio-formats starts to import the images but stops at some point showing the following error message:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 7 6.1; 1671MB of 12152MB (13%)

java.lang.IllegalArgumentException: Invalid series: 4
at loci.formats.FormatReader.setCoreIndex(FormatReader.java:1356)
at loci.formats.ImageReader.setCoreIndex(ImageReader.java:755)
at loci.formats.ReaderWrapper.setCoreIndex(ReaderWrapper.java:588)
at loci.formats.FileStitcher.initReader(FileStitcher.java:1308)
at loci.formats.FileStitcher.getReader(FileStitcher.java:184)
at loci.formats.FileStitcher.computeIndices(FileStitcher.java:1284)
at loci.formats.FileStitcher.openBytes(FileStitcher.java:477)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:156)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:229)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:161)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:233)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:186)
at loci.plugins.in.ImagePlusReader.readProcessors(ImagePlusReader.java:422)
at loci.plugins.in.ImagePlusReader.readPlanes(ImagePlusReader.java:387)
at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:282)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:243)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:221)
at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:116)
at loci.plugins.in.Importer.readPixels(Importer.java:149)
at loci.plugins.in.Importer.run(Importer.java:86)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:230)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

When I open the .czi files as single files without using “Group files with similar names”, everything works fine. I already tested if it is a memory issue by checking “crop on import” and using only a small fraction of the original images, but I always get the same error message.

When I start choosing one of the .czi files conrtaining only 4 instead of 6 tiles in the beginning, I instantly get a different error message before Bio-formats even starts whith the import:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 7 6.1; 1701MB of 12152MB (14%)

java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at ome.xml.model.OME.getImage(OME.java:698)
at ome.xml.meta.OMEXMLMetadataImpl.getImageName(OMEXMLMetadataImpl.java:2420)
at loci.plugins.in.ImportProcess.computeSeriesLabels(ImportProcess.java:727)
at loci.plugins.in.ImportProcess.initializeStack(ImportProcess.java:549)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:146)
at loci.plugins.in.Importer.showDialogs(Importer.java:140)
at loci.plugins.in.Importer.run(Importer.java:76)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:230)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

What is going wrong here?

Can you provide more details as to the options you are using in the Group files dialog, are you using a pattern or just the dimensions? Also what do the filenames for this dataset look like?

Hi,

I used the “Group files with similar names” function using the “File name” option. The File name was SAMPLENAME 100x 10x.czi and I wanted to import all files containing a “10x” in their name.

I solved the problem. It seems, that Bioformats-Importer is not capable to use the “Group files with similar names” function when attempting to import .czi files with a different amount of tiles. I tried it on folders containing only .czi files with the same number of tiles and then it worked properly.

Different tiles willbe interpreted by bioformats as different pyramid levels eg series, which might lead tosome mismatch issues. Just guessing …

Is there any way to make it interpret these as different xy positions or different z positions instead?

That doesn’t sound likely, but there may be some combination of Group Files, Concatenate Series and Swap Dimensions that may improve things. If you have a sample dataset that I can test you can upload it to https://www.openmicroscopy.org/qa2/qa/upload/ and I will see if there is any possibilities.