[ome-users] Import plate data from the FEI MORE as screen in OMERO

Mark Carroll (Staff) m.t.b.carroll at dundee.ac.uk
Fri Nov 16 11:42:41 GMT 2018


Dear Kai,

Yes, I think you need to write your own companion file (very similar to
what you already have among the OME-TIFFs) and put the simple XML in the
OME-TIFFs that, via filename and UUID as I had in my example, describes
the relationship among the companion and its TIFFs.

I'm afraid we don't have easy code handy that would be a helpful basis
for doing this work. Fortunately your XML is already fairly close to
what it should be and the mainstream programming languages these days
have decent DOM manipulation libraries so my suggestion would be to
avoid regular expressions and instead use some XML library to read, fix
and write. tiffcomment can read and write the XML from the TIFFs. But,
you would have to get to grips with coding using some XML library to
make the required adjustments.

An alternative approach might be to use the example of our XML service
code such as the Java implementation in
https://github.com/ome/ome-common-java/tree/master/src/main/java/loci/common
to figure out how to read the XML into a OMEXMLMetadataImpl, manipulate
it via that class' API, then write it out again. However, the source in
that module is probably about all the documentation you're getting on
how to do that and there are some gotchas, so I think you'd have an
easier time avoiding that route and just working with the XML DOM instead.

If you'd like a Python example of how to generate something like the
companion file you'd need then we could try to construct one for you.
I'm afraid you do have a bit of programming ahead of you: what you need
is certainly possible but also not trivial.

You might be interested to know that in due course we hope to relax the
companion file requirements so that you could have a single OME-XML
document for your plate that references a set of simple TIFFs instead of
requiring OME-XML headers also in those TIFFs.

-- Mark

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-users mailing list