We're Hiring!

Import TIFF files

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Import TIFF files

Postby braedyn » Thu Jun 21, 2018 3:11 pm

Hello,

I have a set of TIFF files taken from the same source, but half of the files are not being loaded into ImageJ or Bioformats. Opening in ImageJ does not do anything even after an hour of wait, and using Bioformats gives the following errors:

[ERROR] Error reading IFD type at: 213421728
Reading IFDs

then:

java.io.EOFException: Attempting to read beyond end of file.
at loci.common.NIOFileHandle.readInt(NIOFileHandle.java:378)
at loci.common.RandomAccessInputStream.readInt(RandomAccessInputStream.java:507)
at loci.common.RandomAccessInputStream.readUnsignedInt(RandomAccessInputStream.java:514)
at loci.formats.tiff.TiffParser.getNextOffset(TiffParser.java:1257)
at loci.formats.tiff.TiffParser.getIFDOffsets(TiffParser.java:303)
at loci.formats.tiff.TiffParser.getIFDs(TiffParser.java:217)
at loci.formats.in.MinimalTiffReader.initFile(MinimalTiffReader.java:448)
at loci.formats.in.BaseTiffReader.initFile(BaseTiffReader.java:583)
at loci.formats.FormatReader.setId(FormatReader.java:1397)
at loci.formats.DelegateReader.setId(DelegateReader.java:291)
at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:499)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:142)
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:228)
at ij.IJ.runPlugIn(IJ.java:192)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.BufferUnderflowException: null
at java.nio.Buffer.nextGetIndex(Buffer.java:506)
at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:361)
at loci.common.NIOFileHandle.readInt(NIOFileHandle.java:376)
... 19 common frames omitted
Checking for JAI
Reading movie dimensions


followed by a prompt saying there was an error during import and then in the ImageJ log:

loci.formats.FormatException: loci.common.ReflectException: Cannot execute method: decodeAsRenderedImage
at loci.formats.in.TiffJAIReader.openBufferedImage(TiffJAIReader.java:196)
at loci.formats.in.TiffJAIReader.initFile(TiffJAIReader.java:156)
at loci.formats.FormatReader.setId(FormatReader.java:1397)
at loci.formats.DelegateReader.setId(DelegateReader.java:300)
at loci.plugins.in.ImportProcess.initializeFile(ImportProcess.java:499)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:142)
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:228)
at ij.IJ.runPlugIn(IJ.java:192)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)
Caused by: loci.common.ReflectException: Cannot execute method: decodeAsRenderedImage
at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:316)
at loci.formats.in.TiffJAIReader.openBufferedImage(TiffJAIReader.java:191)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:311)
... 14 more
Caused by: java.io.IOException: Illegal page requested from a TIFF file.
at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:104)
... 19 more


Again, this is only for half the files while the other half works fine. If anybody has had similar errors or possible solutions, help would be greatly appreciated. Thank you!
braedyn
 
Posts: 1
Joined: Tue Jun 19, 2018 3:05 pm

Re: Import TIFF files

Postby mtbc » Fri Jun 22, 2018 9:05 am

At least here at OME's end I am afraid that I don't think we recognize that particular issue. Which version of Bio-Formats are you using? If you send us a problem image via http://qa.openmicroscopy.org.uk/qa/upload/ we'd be happy to try your image with ImageJ here.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Re: Import TIFF files

Postby mtbc » Fri Jun 22, 2018 1:13 pm

Further, I am kindly reminded to check: Have you managed to confirm in any other viewing software that the problem image files are actually fine as TIFFs, that those files aren't simply truncated or otherwise corrupted?

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron