NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #368 (closed defect: fixed)

Opened 2009-03-16T11:57:31-05:00

Last modified 2009-03-16T14:31:15-05:00

Cannot read converted OME-TIFF files with JPEG-2000 compression

Reported by: melissa Owned by: melissa
Priority: minor Milestone: bio-formats-4.1
Component: bio-formats Severity: major
Keywords: Cc:
Blocked By: Blocking:

Description

OME-TIFF files written with JPEG-2000 compression cannot be read. To reproduce:

bfconvert -compression J2K data/tiff/wayne/Rockies-grayscale.tif rockies-j2k.ome.tiff
showinf rockies-j2k.ome.tiff

The following exception will be thrown:

Exception in thread "main" loci.formats.FormatException: Could not decompress JPEG2000 image. Please make sure that jai_imageio.jar is installed.
	at loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:281)
	at loci.formats.codec.BaseCodec.decompress(BaseCodec.java:164)
	at loci.formats.TiffTools.uncompress(TiffTools.java:1349)
	at loci.formats.TiffTools.getTile(TiffTools.java:969)
	at loci.formats.TiffTools.getTile(TiffTools.java:927)
	at loci.formats.TiffTools.getSamples(TiffTools.java:1060)
	at loci.formats.in.MinimalTiffReader.openBytes(MinimalTiffReader.java:129)
	at loci.formats.in.OMETiffReader.openBytes(OMETiffReader.java:84)
	at loci.formats.FormatReader.openBytes(FormatReader.java:563)
	at loci.formats.FormatReader.openImage(FormatReader.java:546)
	at loci.formats.ImageReader.openImage(ImageReader.java:344)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:488)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:59)
	at loci.formats.tools.ImageInfo.main(ImageInfo.java:658)
Caused by: loci.common.ReflectException: Cannot execute method: read
	at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:296)
	at loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:265)
	... 13 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at loci.common.ReflectedUniverse.exec(ReflectedUniverse.java:291)
	... 14 more
Caused by: java.lang.RuntimeException: EOF reached before finding Contiguous Codestream Box
	at com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.initializeRead(J2KReadState.java:696)
	at com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.<init>(J2KReadState.java:189)
	at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.read(J2KImageReader.java:443)
	at javax.imageio.ImageReader.read(ImageReader.java:923)
	... 19 more
Caused by: java.lang.Error: EOF reached before finding Contiguous Codestream Box
	at jj2000.j2k.fileformat.reader.FileFormatReader.readFileFormat(FileFormatReader.java:289)
	at com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.initializeRead(J2KReadState.java:418)
	... 22 more

Change History

comment:1 Changed 2009-03-16T14:31:15-05:00 by melissa

  • Status changed from new to closed
  • Resolution set to fixed

(In [4924]) Only double StripByteCounts values if the strips are compressed with LZW. Fixes #368.