We're Hiring!

how/where to set various metadata in ome.tiff file

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

how/where to set various metadata in ome.tiff file

Postby dsudar » 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
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: how/where to set various metadata in ome.tiff file

Postby dgault » Fri Feb 16, 2018 2:43 pm

Hi Damir,

The best option for storing the resolution in an OME-TIFF would be option (b) using the Pixels in the OME-XML. When reading a TIFF file using any of the TIFF based readers the IFD tags 282 and 283 are read and added to the Pixels in the OME-XML. So when using bfconvert for example the values from these tags will be used in the OME-XML Pixels. For OME-TIFF specifically it will then be this Pixels physical size which is being read as per the OMERO import.

As for the process of adding the metadata, here is no standalone tool that would easier. The alternative solution would be to do so programatically using the OME API's for reading and writing TIFF and OME-TIFF.

David Gault
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron