Closed CameronFRWatson closed 5 months ago
@CameronFRWatson I have a branch for this but just as a heads up, the ome_types
file has all [255, 255, 255]
as default colors and these will get rendered
@ilan-gold thank you for the quick response, and for the heads up! I'll update our script to set non-default colors for the channels
Thanks very much for the detailed issue! We should make our handling of IFD
and PlaneCount
optional as well. The schema strictness was introduced to help us internally. If I understand correctly, should the default IFD
be 0
and is there a default for PlaneCount
?
See #783
@manzt looking at the OME schema (ome.xsd), yes, IFD
has a default of 0
. I think that the PlaneCount
default is 1
, although it's odd that isn't specified in the XML tag, and instead just in the xsd:documentation
tag:
<xsd:attribute name="IFD" type="NonNegativeInt" default="0" use="optional">
<xsd:annotation>
<xsd:documentation>
Gives the IFD(s) for which this element is applicable. Indexed from 0.
Default is 0 (the first IFD). [units:none]
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="PlaneCount" use="optional" type="NonNegativeInt">
<xsd:annotation>
<xsd:documentation>
Gives the number of IFDs affected. Dimension order of IFDs is given by the enclosing
Pixels element's DimensionOrder attribute. Default is the number of IFDs in the TIFF
file, unless an IFD is specified, in which case the default is 1. [units:none]
</xsd:documentation>
</xsd:annotation>
Thanks so much for helping track down this info! Let's just go with default PlaneCount=1
as well.
Thank you @manzt and @ilan-gold for your speedy help!!
Describe the bug Avivator fails when attempting to view images with metadata written by
ome-types (v0.5.0)
possibly due toIFD
andPlaneCount
attributes not being considered optional in Viv's OME XML validation.As far as I understand,
IFD
andPlaneCount
are optional attributes of theTiffData
element according to the most recent version of the OME XML Schema (http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd):In Viv's OME XML validation (
packages/loaders/src/omexml.ts
), these attributes appear to not be considered optional:This causes images with metadata written by
ome_types
to fail because if the value is the default (IFD = 0
, for example), the attribute is omitted from the XML. The following errors are thrown in the UI when reading such an image with Avivator:and in the console:
To Reproduce Steps to reproduce the behavior:
I've generated two versions of the same image which are available on our Galaxy instance here:
https://cancer.usegalaxy.org/u/watsocam/h/avivator-ifd-default-issue-example
You can download the images (400MB each, or view them using the
display at Avivator
button which appears when you click on the dataset)One of the images was created using bioformats and has
<TiffData IFD="0" PlaneCount="12" />
The second image has metadata generated by
ome_types
, which omits attributes if they are the default value:<TiffData PlaneCount="12" />
The second image is not renderable in Avivator and throws the error outlined above, despite the
IFD
attribute being optional forTiffData
elements.Please let me know if there's anything else I can provide to help explain the issue, or if you have any problems with the examples I provided.
Thank you!
Cameron
Environment:
Chrome
122.0.6261.111