Can't open a tiff file

Hi everyone,

I am trying to open a TIFF image, but ImageJ is not able to do this. I don’t understand why.
Here the script:
Thanks for the help.

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 122MB of 24294MB (<1%)

java.lang.NegativeArraySizeException
at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:259)
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.IJ.runPlugIn(IJ.java:182)
at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
at ij.IJ.runUserPlugIn(IJ.java:230)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.IJ.runPlugIn(IJ.java:182)
at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
at ij.io.Opener.openImage(Opener.java:370)
at ij.io.Opener.openImage(Opener.java:242)
at ij.io.Opener.open(Opener.java:109)
at ij.io.Opener.open(Opener.java:72)
at ij.plugin.Commands.run(Commands.java:27)
at ij.IJ.runPlugIn(IJ.java:199)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

Have you tried: Can't open tiff ?

Thanks. Yes, I tried.

But I also tried to open with bioformats importer, but it doesn’t work.

My TIFF is 5,88 gb, too big?

What exception did you get with the Bio-Formats Importer? If you use the importer options to crop the image to a smaller region does that allow you to open it?

If I crop the image to a smaller region, Image J is able to open my file. But it is difficult to select the region that I want.

Here the script when I use bioformat importer.

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52p; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 154MB of 24294MB (<1%)
java.lang.NegativeArraySizeException
at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:259)
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)

The issue here is that the size of the image plane (width x height x bytesPerPixel) is greater than the max that can be handled by the plugin. Using crop on import will be the easiest solution, alternatively you would need to use a different solution that uses tiling with the image reader.

Hi Edo,

As @dgault said, the problem is that the total size exceeds the 2GB allowed by Java in ImageJ. The only way to open it is to crop it. Moreover, this tiff is a BigTiff, so some software can’t open it.
But QuPath allowed me to open it.

Nico

1 Like

Thank you both for the answer.

Using QuPath is also possible to know the resolution of the image?

1 Like

Yep. 0.25µm per pixel in this image, scanned with Philips DP V1.0.
Btw, are you satisfied with this scanner (user friendly interface, speed of scanning, nb of human interaction needed to put focus points, ok for H&E and for IHC… ?)

Nico