[ome-users] Out of bounds exception reading .ome.tiff
Roger Leigh
rleigh at dundee.ac.uk
Tue Apr 14 16:36:21 BST 2015
On 14/04/15 10:33, Maier, Lorenz wrote:
> Hi,
>
> while trying to read a .ome.tiff, I got an
> ArrayIndexOutOfBoundsException and uploaded an example as QA Bug 10990.
>
> Generally, is it enough to upload the problematic files in the QA system
> or should I mention it here again?
Dear Lorenz,
It's enough to upload it with a descriptive comment, as you did here,
thanks. We often see file uploads with no email and no comment, which
makes it hard to know what they were uploaded for!
In this case, I'm afraid that the Zen Blue OME-TIFF export is
broken--it's created an invalid OME-TIFF which can't be read. I can see
four problems with it (there may be others I haven't spotted):
1) The OME-XML metadata pixel type does not match the TIFF sample format:
OME-XML:
Type="uint16"
TIFF:
Bits/Sample: 8
Sample Format: unsigned integer
This is the probable cause of the index out of bounds error seen
here; the metadata indicates that there is twice the amount of data than
actually present in the TIFF.
2) The OME-XML metadata is invalid:
./tools/xmlvalid 45\ min-OME\ TIFF-Export-144_s579.ome.tiff
Parsing schema path
http://www.openmicroscopy.org/Schemas/OME/2010-06/ome.xsd
Validating 45 min-OME TIFF-Export-144_s579.ome.tiff
cvc-complex-type.2.4.b: The content of element 'LightSource' is not
complete. One of
'{"http://www.openmicroscopy.org/Schemas/OME/2010-06":Laser,
"http://www.openmicroscopy.org/Schemas/OME/2010-06":Filament,
"http://www.openmicroscopy.org/Schemas/OME/2010-06":Arc,
"http://www.openmicroscopy.org/Schemas/OME/2010-06":LightEmittingDiode}'
is expected.
Error validating document: 1 errors found
We have seen this in the past with data exported from Zen Blue. This
isn't the cause of the problem you're seeing, however.
3) The TIFF file contains errors:
% tiffinfo 45\ min-OME\ TIFF-Export-144_s579.ome.tiff >/dev/null
MissingRequired: TIFF directory is missing required "ImageLength" field.
While this might not be critical, one of the IFDs is missing a
required field.
4) The Tile length and height are 4 and 6 pixels larger than the Image
length and height, respectively. While this isn't necessarily wrong,
I'm not sure why that would be done; it might potentially also
contribute to the problems.
As a workaround, you might be able to use "bfconvert" to convert the CZI
to OME-TIFF. Or export a subset of the data as CZI first, and then
convert that to OME-TIFF (or use it directly).
Unfortunately, there's not much we can do here; these problems are bugs
in Zen Blue's export logic. I would suggest contacting Zeiss regarding
these problems.
We might be able to add support to work around these problems, however
it won't currently read with the base TIFF reader in Bio-Formats
(ignoring the OME-XML), and is also unreadable in a couple of other
libtiff-using viewers I tried. I also tried reading it with the C++
(libtiff-based reader) and extracted this (note the switch between 8-
and 16-bit data every 8 and 13 planes which are aggregated into series
by the reader; this isn't reflected in the OME-XML which has
'Type="uint16" SizeX="1004" SizeY="1002" SizeZ="21" SizeC="2"
SizeT="1"', where the total plane count matches, but not the pixel types):
% bf-test info 45\ min-OME\ TIFF-Export-144_s579.ome.tiff
Image: 45 min-OME TIFF-Export-144_s579.ome.tiff
Using reader: TIFF (Tagged Image File Format)
getFieldInfo: tag 50838 unknown
Reader setup took 00:00:00.029579
Filename = "45 min-OME TIFF-Export-144_s579.ome.tiff"
Used files = ["45 min-OME TIFF-Export-144_s579.ome.tiff"]
Reading core metadata
Series count = 4
Series #0:
Image count = 8
RGB = false (1)
Interleaved = false
Indexed = false
Width = 1004
Height = 1002
SizeZ = 1 (effectively 1)
SizeT = 8 (effectively 8)
SizeC = 1 (effectively 1)
Thumbnail size = 128 × 127
Endianness = little
DimensionOrder = XYCZT (certain)
PixelType = uint8
Bits per Pixel = 8
MetadataComplete = true
ThumbnailSeries = false
Series #1:
Image count = 13
RGB = false (1)
Interleaved = false
Indexed = false
Width = 1004
Height = 1002
SizeZ = 1 (effectively 1)
SizeT = 13 (effectively 13)
SizeC = 1 (effectively 1)
Thumbnail size = 128 × 127
Endianness = little
DimensionOrder = XYCZT (certain)
PixelType = uint16
Bits per Pixel = 16
MetadataComplete = true
ThumbnailSeries = false
Series #2:
Image count = 8
RGB = false (1)
Interleaved = false
Indexed = false
Width = 1004
Height = 1002
SizeZ = 1 (effectively 1)
SizeT = 8 (effectively 8)
SizeC = 1 (effectively 1)
Thumbnail size = 128 × 127
Endianness = little
DimensionOrder = XYCZT (certain)
PixelType = uint8
Bits per Pixel = 8
MetadataComplete = true
ThumbnailSeries = false
Series #3:
Image count = 13
RGB = false (1)
Interleaved = false
Indexed = false
Width = 1004
Height = 1002
SizeZ = 1 (effectively 1)
SizeT = 13 (effectively 13)
SizeC = 1 (effectively 1)
Thumbnail size = 128 × 127
Endianness = little
DimensionOrder = XYCZT (certain)
PixelType = uint16
Bits per Pixel = 16
MetadataComplete = true
ThumbnailSeries = false
No global metadata
Series #0 metadata:
BitsPerSample: 8
Compression: 5
ImageLength: 1002
ImageWidth: 1004
NumberOfChannels: 1
PhotometricInterpretation: 1
Planar Configuration: 1
ResolutionUnit: 1
SampleFormat: 1
SamplesPerPixel: 1
TileLength: 1008
TileWidth: 1008
XResolution: 0
YResolution: 0
Series #1 metadata:
BitsPerSample: 16
Compression: 5
ImageLength: 1002
ImageWidth: 1004
NumberOfChannels: 1
PhotometricInterpretation: 1
Planar Configuration: 1
ResolutionUnit: 1
SampleFormat: 1
SamplesPerPixel: 1
TileLength: 1008
TileWidth: 1008
XResolution: 0
YResolution: 0
Series #2 metadata:
BitsPerSample: 8
Compression: 5
ImageLength: 1002
ImageWidth: 1004
NumberOfChannels: 1
PhotometricInterpretation: 1
Planar Configuration: 1
ResolutionUnit: 1
SampleFormat: 1
SamplesPerPixel: 1
TileLength: 1008
TileWidth: 1008
XResolution: 0
YResolution: 0
Series #3 metadata:
BitsPerSample: 16
Compression: 5
ImageLength: 1002
ImageWidth: 1004
NumberOfChannels: 1
PhotometricInterpretation: 1
Planar Configuration: 1
ResolutionUnit: 1
SampleFormat: 1
SamplesPerPixel: 1
TileLength: 1008
TileWidth: 1008
XResolution: 0
YResolution: 0
Kind regards,
Roger
--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
More information about the ome-users
mailing list