Task #11998 (closed)
Opened 5 years ago
Closed 5 years ago
Bug: Valid JPEG2000 images being detected and processed as ND2
| Reported by: | rleigh | Owned by: | mlinkert |
|---|---|---|---|
| Priority: | major | Milestone: | 5.0.3 |
| Component: | Bio-Formats | Version: | 4.4.10 |
| Keywords: | ND2Reader | Cc: | jonas.ogaard@… |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | n.a. |
Description
See: https://www.openmicroscopy.org/qa2/qa/feedback/7906/ for four sample images
and http://lists.openmicroscopy.org.uk/pipermail/ome-users/2014-February/004210.html
Each of these images is (what appears to be) valid JPEG2000 data; I can certainly view them as such outside bioformats using Krita/Gwenview?.
With bioformats, this is being read with ND2Reader, which if I read readers.txt correctly should be a fallback if JPEG2000Reader fails to treat it as valid JPEG2000 data? If that's the case, it looks like these are files which JPEG2000Reader should be able to read, but currently can't handle. Unless the ND2Reader should be able to handle these as ND2 files as well, in which case it's a problem with ND2Reader.
Change History (3)
comment:1 Changed 5 years ago by rleigh
comment:2 Changed 5 years ago by mlinkert
- Milestone changed from Unscheduled to 5.0.3
comment:3 Changed 5 years ago by mlinkert
- Resolution set to fixed
- Status changed from new to closed
PR opened for inclusion in 5.0.3: https://github.com/openmicroscopy/bioformats/pull/1159
% showinf 7906/2591B.jp2 Checking file format [Nikon ND2] Initializing reader ND2Reader initializing ./7906/2591B.jp2 Calculating image offsets Finding XML metadata Parsing XML Finished assembling XML string Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -11198 at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:872) at java.lang.StringBuffer.substring(StringBuffer.java:412) at loci.formats.in.NativeND2Reader.initFile(NativeND2Reader.java:1383) at loci.formats.FormatReader.setId(FormatReader.java:1360) at loci.formats.DelegateReader.setId(DelegateReader.java:267) at loci.formats.ImageReader.setId(ImageReader.java:781) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:576) at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:576) at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:993) at loci.formats.tools.ImageInfo.main(ImageInfo.java:1075)This affects dev_4_4, dev_5_0, develop.