[ome-users] java.lang.illegalArgumentException: Array size too large

MEYENHOFER Felix felix.meyenhofer at unifr.ch
Sat Mar 21 16:34:08 GMT 2015


Hi Melissa

cropping on import did the trick. Thanks.

What baffles me though is that even if I only take an ROI that corresponds to approximately 1/8 of the high-resolution series and save it as a tiff, the resulting file is about as big as the original ndpi file. When I use JPEG-200 compression, the resulting output is about 1/3 of the size of the original file (which is still bigger, since I only have 1/8 of the original pixels).
Also the compressed images take forever to load again.

So I am curious how the people from Hamamatsu actually do it???

Best, 

Felix


> On 18 Mar 2015, at 18:54 , Melissa Linkert <melissa at glencoesoftware.com> wrote:
> 
> Hi Felix,
> 
>> I am trying to open an ndpi-file of about 90MB. And I get the following exception:
>> 
>> 
>> (Fiji Is Just) ImageJ 2.0.0-rc-25/1.49p; Java 1.6.0_65 [64-bit]; Mac OS X 10.10.2; 37MB of 5011MB (<1%)
>> 
>> java.lang.IllegalArgumentException: Array size too large: 82560 x 29440 x 1
>> 	at loci.common.DataTools.safeMultiply32(DataTools.java:854)
> *snip*
>> Here’s a link to the file
>> https://dl.dropboxusercontent.com/u/18607042/hamamatsu_slide-scanner-example.ndpi
>> 
>> The image can be imported with OMERO.importer. However fiji or icy have the same problem if I want to open the series with the highest resolution.
>> I tried running imageJ with java8 too, to see if it was a java array problem…
>> 
>> I was using the bio-formats version 5.0.7
>> 
>> Is this a java of a loci problem?
> 
> ImageJ/Fiji/Icy are limited to 2GB of pixel data in each image.  You
> will need to select the "Crop on import" option in the "Bio-Formats
> Import Options" window to open smaller sections of the image at a time.
> OMERO handles large images like this by working with small tiles at a
> time behind the scenes, which is why the file imports into OMERO without
> an error.
> 
> If the "Crop on import" option doesn't work, please let us know.
> 
> Regards,
> -Melissa
> 
> On Wed, Mar 18, 2015 at 11:47:55AM +0000, MEYENHOFER Felix wrote:
>> 
>> Hi
>> 
>> I am trying to open an ndpi-file of about 90MB. And I get the following exception:
>> 
>> 
>> (Fiji Is Just) ImageJ 2.0.0-rc-25/1.49p; Java 1.6.0_65 [64-bit]; Mac OS X 10.10.2; 37MB of 5011MB (<1%)
>> 
>> java.lang.IllegalArgumentException: Array size too large: 82560 x 29440 x 1
>> 	at loci.common.DataTools.safeMultiply32(DataTools.java:854)
>> 	at loci.common.DataTools.allocate(DataTools.java:828)
>> 	at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:153)
>> 	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>> 	at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:243)
>> 	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>> 	at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>> 	at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:190)
>> 	at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:87)
>> 	at loci.plugins.util.ImageProcessorSource.getObject(ImageProcessorSource.java:74)
>> 	at loci.formats.cache.Cache.recache(Cache.java:208)
>> 	at loci.formats.cache.Cache.recache(Cache.java:228)
>> 	at loci.formats.cache.Cache.<init>(Cache.java:92)
>> 	at loci.plugins.util.BFVirtualStack.<init>(BFVirtualStack.java:123)
>> 	at loci.plugins.in.ImagePlusReader.createVirtualStack(ImagePlusReader.java:331)
>> 	at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:276)
>> 	at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:238)
>> 	at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:216)
>> 	at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:114)
>> 	at loci.plugins.in.Importer.readPixels(Importer.java:150)
>> 	at loci.plugins.in.Importer.run(Importer.java:89)
>> 	at loci.plugins.LociImporter.run(LociImporter.java:81)
>> 	at ij.IJ.runUserPlugIn(IJ.java:199)
>> 	at ij.IJ.runPlugIn(IJ.java:163)
>> 	at ij.Executer.runCommand(Executer.java:131)
>> 	at ij.Executer.run(Executer.java:64)
>> 	at java.lang.Thread.run(Thread.java:695)
>> 
>> 
>> Here’s a link to the file
>> https://dl.dropboxusercontent.com/u/18607042/hamamatsu_slide-scanner-example.ndpi
>> 
>> The image can be imported with OMERO.importer. However fiji or icy have the same problem if I want to open the series with the highest resolution.
>> I tried running imageJ with java8 too, to see if it was a java array problem…
>> 
>> I was using the bio-formats version 5.0.7
>> 
>> Is this a java of a loci problem?
>> 
>> Best regards, 
>> 
>> 
>> -------------------------------------
>> Felix Meyenhofer
>> University of Fribourg
>> Departement of Medicine - Anatomy
>> 1, Rte. Albert Gockel
>> CH-1700 Fribourg 
>> 
>> Tel:  +41 26 300 85 45
>> Web:  www.unifr.ch/anatomy
>>     www.unifr.ch/bioimage
>> -------------------------------------
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list