Error while opening .nd2 file

Hi,

I am trying to open a 5.2 GB tile and stitched .nd2 file which contains 4 channels. It fails to open using BioFormats and gives me a list of error messages mainly pertaining to Java. I have assigned 15 GB of RAM. The error message appears after utilizing 2.81 GB of RAM. In contrast, I am able to open a 1.3 GB tile and stitched .nd2 file without any issues.

I was however, able to open the 5.2GB .nd2 file using File --> Import option, which is a memory intensive and very slow process. I would love to know if BioFormats can handle this.

Happy to hear your thoughts.

Thanks,
Gaurav.

(Fiji Is Just) ImageJ 2.1.0/1.53c; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 13117MB of 15000MB (87%)
 
java.lang.IllegalArgumentException
	at java.nio.Buffer.limit(Buffer.java:275)
	at loci.common.NIOFileHandle.read(NIOFileHandle.java:309)
	at loci.common.NIOFileHandle.read(NIOFileHandle.java:292)
	at loci.common.RandomAccessInputStream.read(RandomAccessInputStream.java:691)
	at loci.formats.in.NativeND2Reader.openBytes(NativeND2Reader.java:310)
	at loci.formats.DelegateReader.openBytes(DelegateReader.java:227)
	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.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:83)
	at loci.plugins.util.ImageProcessorSource.getObject(ImageProcessorSource.java:72)
	at loci.formats.cache.Cache.recache(Cache.java:204)
	at loci.formats.cache.Cache.recache(Cache.java:224)
	at loci.formats.cache.Cache.<init>(Cache.java:88)
	at loci.plugins.util.BFVirtualStack.<init>(BFVirtualStack.java:126)
	at loci.plugins.in.ImagePlusReader.createVirtualStack(ImagePlusReader.java:339)
	at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:281)
	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:235)
	at ij.IJ.runPlugIn(IJ.java:198)
	at ij.Executer.runCommand(Executer.java:150)
	at ij.Executer.run(Executer.java:68)
	at java.lang.Thread.run(Thread.java:748)

1 Like

Thanks for reporting this, @gjoshi. If possible, it would be very helpful to see the file that causes this error. I will send a private message with instructions on how to send large files to the OME team.

Thank you for uploading an example file. I can duplicate the error, and have noted it on the relevant GitHub issue:

In the meantime, you should be able to access all of the data by opening smaller tiles using the “Crop on import” option.

1 Like