We're Hiring!

OME-XML metadata export

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

OME-XML metadata export

Postby evenhuis » Tue Feb 13, 2018 5:12 am

Hi,

I just wanted to check how people are using OMERO for analysis that relies on image metadata. Most of my FIJI scripts rely on being able access metadata (like pixel size) in scripts either through Bioformats extensions or by parsing the strings from the Metadata window.

However, when an OME-XML is downloaded from OMERO or opened through the FIJI-OMERO plugin there is a minimum of metadata in in the "Display Metadata" window. There is a little more in the "Display OME-XML metadata" window, but nothing compared to volume from opening the original file in Bioformats.

My questions are:
1. Why isn't the "Display Window" being populated for OME-XML generated by OMERO?

2. How do people get at the OME-XML metadata? I can't get Bioformats extensions to work for images open through the OMERO plugin as this needs a file path.

Code: Select all
Ext.openImagePlus(path)
-- Opens the image at the given path with the default options.
Ext.openThumbImagePlus(path)
-- Opens the thumbnail image at the given path
-- with the default options.
Ext.getFormat(id, format)
-- Retrieves the file format of the given id (filename).
Ext.setId(id)
-- Initializes the given id (filename).


Is there some other way to parse XML in an imageJ macro?

2. The OME-XML is different for a file loaded through OMERO versus an OME-XML downloaded from OMERO and opened in FIJI. The dowloaded OME-XML has more data in TiffData and Plane information.

3. This may be been covered before, but is possible to export the metadata generated in OMERO by tag and map annotations? It would be a great way to keep the experimental metadata with the images.

Thanks,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: OME-XML metadata export

Postby dgault » Wed Feb 14, 2018 5:06 pm

Hi Chris,

Firstly the reason why the display window in ImageJ showing the OME-XML does not contain the full XML is for performance reasons relating to memory usage. Although it may look as though there are metadata values missing (such as the annotations), if you select Image -> Show Info, you should find that all of the data has been read and is available.

As for how to best access and parse the data, doing so with the Bio-Formats Macro extensions may be rather tricky, in which case writing a small plugin using Bio-Formats may be an option. I can perhaps help and assist in providing some samples and guidance for this. Are you interested in retrieving and parsing all of the metadata or is it only specific fields such as the tag and map annotations which are of interest?

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

Re: OME-XML metadata export

Postby evenhuis » Mon Feb 19, 2018 6:08 am

Hi David,

Thanks for tip about the "Show Info" window. A long time ago decided to stick with the Metadata window from bioformats for some reason - I thought it was because the metadata window at more data but that's not the case at all.

It would be great to be able to access the tag and map annotations in addition to the metadata normally imported by bioformats . I'm having trouble exporting metadata from OMERO at the moment. I was thinking of going this route:

1. using bftools to extract the existing metadata
2. parsing the XML in python
3. add the mapannotations to the element tree like in this example
Code: Select all
<StructuredAnnotations>
<!--  First Tag  -->
<MapAnnotation ID="Annotation:1">
<Description>This is the description of the sample map A</Description>
<Value>
<M K="SampleKeyA">SampleValueA</M>
</Value>
</MapAnnotation>


Is this the right way to go?

Cheers,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: OME-XML metadata export

Postby mtbc » Mon Feb 19, 2018 10:22 am

Dear Chris,

You are of course correct to note that the OME-XML component of export from OMERO omits a lot of metadata, perhaps most of it. This issue has been on our radar for several years but so far our funding and users have tended to push our limited resources toward other priorities: for example, a current thrust continues to be improving scaling for big data, in IDR, etc.

Specifically adding map annotations to OME-TIFF export may be quite feasible even in a point release but you should find that the workaround of using other structured annotation types such as XML annotation means that their data is included in export. One could even have a script copy the required metadata into one of those before export.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron