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

Kai Schleicher kai.schleicher at unibas.ch
Fri Nov 16 14:55:45 GMT 2018


Hi Mark,

thank you very much once again for your helpful mail!

I really appreciate your time supporting my vague questions :)

Now that I have reached an understanding of what needs to be done and 
also how to do it, I think the path is set.

> I'm afraid you do have a bit of programming ahead of you: what you need
> is certainly possible but also not trivial.

I am getting more and more familiar with python (for scripting imageJ 
anyway), so I started looking into suitable modules and found 
xml.dom.minidom, but I am new in manipulating XML files.

> 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.
that would be amazing!! Thank you so much!

I will try and see what I can do on my own of course, but needless to 
say an example by you would be brilliant!

Thank you again and cheers,
Kai

On 11/16/18 12:42 PM, Mark Carroll (Staff) wrote:
> 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
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


More information about the ome-users mailing list