Page 1 of 1

OME XML parsing from bio-formats reader plugin

PostPosted: Tue Jun 16, 2015 5:28 pm
by richard3i
I generate OME XML meta data that we include in our OME TIFF files. At some point we'll use the C++ bioformats library to generate it, but for now we do it by hand.

My question is, is there a way in a Bio-formats reader plugin to populate the meta data of an image from the ome xml? I'm trying to avoid having to set all of the meta data by hand in the reader plugin after already doing it in the OME TIFF exporter.

I think it would be easier to translate the meta data in one place to produce the OME XML string and then set the meta data in the reader from that OME XML string.

Any idea if this would be possible?

Re: OME XML parsing from bio-formats reader plugin

PostPosted: Wed Jun 17, 2015 12:08 pm
by rleigh
Dear Richard,

At least for the C++ case, we expose this directly to the user:

http://downloads.openmicroscopy.org/bio ... 8874a85731

Here you can create the metadata directly from a DOM document, an XML file or an XML string.

The same is possible with the existing Java API using the OMEXMLService:

http://downloads.openmicroscopy.org/bio ... .String%29

but this is from a string only; it doesn't have the overloaded methods for the other possiblities. See, for example, https://github.com/openmicroscopy/biofo ... .java#L438 - 441 for how the Java OME-TIFF reader uses this.

I hope this answers your question; if I've not got exactly what you were asking for, please let me know and I'll try again!


Regards,
Roger