We're Hiring!

OME XML parsing from bio-formats reader plugin

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.

OME XML parsing from bio-formats reader plugin

Postby richard3i » Tue Jun 16, 2015 5:28 pm

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?
richard3i
 
Posts: 5
Joined: Tue Sep 30, 2014 10:11 am

Re: OME XML parsing from bio-formats reader plugin

Postby rleigh » Wed Jun 17, 2015 12:08 pm

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
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest