how/where to set various metadata in ome.tiff file
Posted: Fri Feb 16, 2018 7:22 am
Hi team,
I'm creating ome.tif files using bfconvert from a set of individual tiffs (using the pattern trick). That works fine and the resulting files are properly handled by ImageJ and OMERO import.
However, pretty much none of the metadata from the original tiff files survives the bfconvert step and I would like to add some critical metadata needed for the downstream steps. That brought up some questions:
1) where to add X and Y resolution info:there are quite a number of possible places: a) in the XML header in the <XMLAnnotations section, b) in the <Pixels ... /Pixels> section, c) per: http://www.openmicroscopy.org/community ... 77&p=16128, TIFF tags 282 and 283, and d) the EXIF IFD appears to have another set of tags incl. 296 for the units. OMERO import appears to listen to b) when importing my file but shows either c) or d) in the Original Metadata. tiffinfo and presumably all regular tiff readers also only look at TIFF tags. What is your recommendation on where to set these values?
2) adding additional metadata: I'd like to set a bunch of Instrument metadata and while I can manually edit the XML header (using tiffcomment | xmlindent to get it and then tiffcomment -set to push that back in) that is not a scalable workflow. Are there some nice utilities to insert such metadata into ome.tiff files?
Thanks,
- Damir
I'm creating ome.tif files using bfconvert from a set of individual tiffs (using the pattern trick). That works fine and the resulting files are properly handled by ImageJ and OMERO import.
However, pretty much none of the metadata from the original tiff files survives the bfconvert step and I would like to add some critical metadata needed for the downstream steps. That brought up some questions:
1) where to add X and Y resolution info:there are quite a number of possible places: a) in the XML header in the <XMLAnnotations section, b) in the <Pixels ... /Pixels> section, c) per: http://www.openmicroscopy.org/community ... 77&p=16128, TIFF tags 282 and 283, and d) the EXIF IFD appears to have another set of tags incl. 296 for the units. OMERO import appears to listen to b) when importing my file but shows either c) or d) in the Original Metadata. tiffinfo and presumably all regular tiff readers also only look at TIFF tags. What is your recommendation on where to set these values?
2) adding additional metadata: I'd like to set a bunch of Instrument metadata and while I can manually edit the XML header (using tiffcomment | xmlindent to get it and then tiffcomment -set to push that back in) that is not a scalable workflow. Are there some nice utilities to insert such metadata into ome.tiff files?
Thanks,
- Damir