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 #359 (closed defect: fixed)

Opened 2009-02-13T13:28:52-06:00

Last modified 2009-03-02T14:33:30-06:00

Exception when reading signed 16 bit images

Reported by: melissa Owned by: curtis
Priority: major Milestone:
Component: bio-formats Severity: major
Keywords: Cc: Sebastien.SCHAUB@…
Blocked By: Blocking:

Description

As of r4804, attempting to read a signed 16-bit image throws the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: Raster ShortInterleavedRaster: width = 384 height = 384 #numDataElements 1 is incompatible with ColorModel ColorModel: #pixelBits = 16 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@347124 transparency = 3 has alpha = true isAlphaPre = false
	at java.awt.image.BufferedImage.<init>(BufferedImage.java:616)
	at loci.formats.AWTImageTools.openImage(AWTImageTools.java:820)
	at loci.formats.FormatReader.openImage(FormatReader.java:521)
	at loci.formats.ImageReader.openImage(ImageReader.java:344)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:485)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:59)
	at loci.formats.tools.ImageInfo.main(ImageInfo.java:655)

This can be reproduced with deltavision/ome/Antarctic_Diatom_D3D_01.dv (among others).

Change History

comment:1 Changed 2009-03-02T13:04:01-06:00 by curtis

  • Cc Sebastien.SCHAUB@… added

comment:2 Changed 2009-03-02T14:33:30-06:00 by curtis

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

(In [4874]) Use USHORT instead of SHORT for 16-bit integer SignedColorModel. Fixes #359. This is consistent with the code from before r4804, but does not seem logical. Further investigation is warranted into the ramifications of this approach.