Ticket #548 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Support OME-XML with BinData.Length = 0

Reported by: callan Owned by: callan
Priority: major Milestone:
Component: bio-formats Severity: serious
Keywords: Cc:
Blocked By: Blocking:

Description

It should be possible to at least initialize the reader state when BinData elements have a zero length. The reader stack is:

  • MinMaxCalculator
  • ChannelSeparator
  • ChannelFiller
  • ImageReader (OMEXMLReader)

Currently the ChannelFiller makes an attempt to read at least one pixel from the file, causing the following exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException
java.lang.System.arraycopy(Native Method)
loci.formats.in.OMEXMLReader.openBytes(OMEXMLReader.java:183)
loci.formats.FormatReader.openBytes(FormatReader.java:756)
loci.formats.ImageReader.openBytes(ImageReader.java:370)
loci.formats.ChannelFiller.getLookupTableComponentCount(ChannelFiller.java:262)
loci.formats.ChannelFiller.setId(ChannelFiller.java:245)
loci.formats.ReaderWrapper.setId(ReaderWrapper.java:480)
loci.formats.ChannelSeparator.setId(ChannelSeparator.java:238)
loci.formats.ReaderWrapper.setId(ReaderWrapper.java:480)

Change History

comment:1 Changed 9 years ago by callan

  • Owner changed from melissa to callan
  • Status changed from new to assigned

comment:2 Changed 9 years ago by callan

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

(In [6876]) Some further test case cleanup. Added a check to ChannelFiller to handle cases where reading the first pixel of a file fails, which is now logged rather than being fatal. Also added a test case for the functionality. (Fixes #548)

Note: See TracTickets for help on using tickets.