[ome-devel] metadata.getChannelName() throws exception

Bonamy, Ghislain ghislain.bonamy at novartis.com
Mon Mar 31 06:40:32 BST 2014


In the process of working with the Flex reader and finding a temporary solution, I have found what may be a bug:

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
       at java.util.ArrayList.rangeCheck(Unknown Source)
       at java.util.ArrayList.get(Unknown Source)
       at ome.xml.model.Pixels.getChannel(Pixels.java:573)
       at ome.xml.meta.OMEXMLMetadataImpl.getChannelName(OMEXMLMetadataImpl.java:1053)
       at org.gnf.HCIReaders.HCIReaderOpera.setWellImagesProps(HCIReaderOpera.java:161)

In the past the  ome.xml.model.Pixels.getChannel() returned null if it did not exist. I have figured out that in my case, I need to invert int imageIndex, int channelIndex, which is probably caused by the bug in handling the flex format from v2.0.  However, I think that either the out-of bound exception should be handled internally and that the value null should be returned (I think this was the default behavior), or that the method should throw an error of its own, which a programmer would know to handle externally.

Best,

Ghislain Bonamy, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20140331/448d78c3/attachment.html>


More information about the ome-devel mailing list