We're Hiring!

OME-XML metadata from an Imagej macro?

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 metadata from an Imagej macro?

Postby i.munro » Wed Dec 06, 2017 4:57 pm

Hello all.

Can anyone suggest a way to access arbitrary OME-XML metadata from an Imagej macro please?
I use the Bio-Formats macro extensions for most things but I now need to access the "Detector ID"
as shown in the attached screenshot.
The file in question is an ome-tiff generated by Micro-Manager.

Thanks in advance

Ian
Attachments
Screen Shot 2017-12-06 at 14.43.00.jpg
Screen Shot 2017-12-06 at 14.43.00.jpg (204.74 KiB) Viewed 2516 times
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: OME-XML metadata from an Imagej macro?

Postby i.munro » Thu Dec 07, 2017 2:21 pm

I should add that my current approach - while crude does work:

https://github.com/imunro/HPC_STORM/blo ... o.ijm#L131
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: OME-XML metadata from an Imagej macro?

Postby dgault » Thu Dec 07, 2017 2:32 pm

Hi Ian,

Unfortunately the existing Macro extensions do not cover all of the metadata and "Detector ID" is not one of the fields that is easily retrieved.If you need greater access to the metadata one approach may be to use a custom plugin rather than a macro.

Below is an example of a simple plugin to read and display an image. The difference here is that it provides you with full access to the Bio-Formats Java API. If that sounds like an approach that might work I can certainly help you with accessing specific metadata using the plugin approach:
https://github.com/openmicroscopy/biofo ... Image.java

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

Re: OME-XML metadata from an Imagej macro?

Postby dgault » Thu Dec 07, 2017 2:41 pm

Just seeing your follow up with your current approach. If you are able to parse the values from original metadata fields, although it is not ideal and more hassle than reading the Dectector field directly, that may be an easier solution than having to rewrite a plugin.
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: OME-XML metadata from an Imagej macro?

Postby i.munro » Thu Dec 07, 2017 3:01 pm

Thanks David

I wondered if I was missing something obvious.
I'm going to try, initially then to change where that info is in the Metadata in the acquisition code.

Your help is much appreciated as ever.

Ian
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 0 guests