[ome-devel] Is OME-TIF file with 2 image series of different pixel types supported?
Roger Leigh
rleigh at dundee.ac.uk
Thu Dec 1 14:58:52 GMT 2016
On 01/12/16 14:27, Michael Ellis wrote:
> Dear Roger,
>
> File
> uploaded https://www.openmicroscopy.org/qa2/qa2/qa/feedback/17455/?token=0d0ad37c09cfdd73ca5c28df3d42e1b0
>
> I am currently just using Metadata methods to populate my metadata. Can
> you point me in the right direction for adding this TiffData that you
> refer to?
If you're creating your images using the FormatWriter API, then TiffData
elements should be created automatically:
https://github.com/openmicroscopy/bioformats/blob/develop/components/formats-bsd/src/loci/formats/out/OMETiffWriter.java#L298
This is all appended to the metadata store when the writer is closed,
and then attached to the TIFF ImageDescription field.
If you're creating images by hand, then you need to use the same
metadata store calls to do the same.
Since they were already created for your first image, I'm wondering if
saveBytes wasn't called for the image planes in the second image? The
first image has three TiffData elements referring to IFDs 0, 1 and 2.
There are three IFDs in the TIFF you uploaded. But the image data for
the second image is missing--there are no extra IFDs in the TIFF for
this (I would have expected a further three TiffData elements, and
another three IFDs).
If you have any code you could show us, I can see if there's any
critical omission there. Otherwise, I think it might be sufficient to
add saveBytes calls for the second image, and it should be fine.
Also, to pick up on invalid TIFF creation, you can run the "xmlvalid"
tool on the OME-TIFF file, which will highlight anything missing. In
the case of your sample file:
% ~/code/bioformats/tools/xmlvalid BioFormat-Mixed.ome.tif
Parsing schema path
http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd
Validating BioFormat-Mixed.ome.tif
cvc-pattern-valid: Value 'Instrument 1' is not facet-valid with respect
to pattern '(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)' for
type 'InstrumentID'.
cvc-attribute.3: The value 'Instrument 1' of attribute 'ID' on element
'Instrument' is not valid with respect to its type, 'InstrumentID'.
cvc-pattern-valid: Value 'EmulatedCamera_0' is not facet-valid with
respect to pattern
'(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)' for type
'DetectorID'.
cvc-attribute.3: The value 'EmulatedCamera_0' of attribute 'ID' on
element 'Detector' is not valid with respect to its type, 'DetectorID'.
cvc-pattern-valid: Value 'Dapi' is not facet-valid with respect to
pattern '(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)' for type
'FilterID'.
cvc-attribute.3: The value 'Dapi' of attribute 'ID' on element 'Filter'
is not valid with respect to its type, 'FilterID'.
cvc-pattern-valid: Value 'Fitc' is not facet-valid with respect to
pattern '(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)' for type
'FilterID'.
cvc-attribute.3: The value 'Fitc' of attribute 'ID' on element 'Filter'
is not valid with respect to its type, 'FilterID'.
cvc-identity-constraint.4.2.2: Duplicate key value [EmulatedOpticSet_0]
declared for identity constraint "FilterIDKey" of element "OME".
cvc-pattern-valid: Value 'TxRed' is not facet-valid with respect to
pattern '(urn:lsid:([\w\-\.]+\.[\w\-\.]+)+:\S+:\S+)|(\S+:\S+)' for type
'FilterID'.
cvc-attribute.3: The value 'TxRed' of attribute 'ID' on element 'Filter'
is not valid with respect to its type, 'FilterID'.
cvc-identity-constraint.4.2.2: Duplicate key value [EmulatedOpticSet_0]
declared for identity constraint "FilterIDKey" of element "OME".
cvc-complex-type.2.4.b: The content of element 'Pixels' is not complete.
One of '{"http://www.openmicroscopy.org/Schemas/OME/2016-06":Channel,
"http://www.openmicroscopy.org/Schemas/OME/2016-06":BinData,
"http://www.openmicroscopy.org/Schemas/OME/2016-06":TiffData,
"http://www.openmicroscopy.org/Schemas/OME/2016-06":MetadataOnly}' is
expected.
Error validating document: 13 errors found
so this can be quite useful in determining if there are any problems
with the metadata being set.
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-devel
mailing list