We're Hiring!

Adding tags or key/value pairs during read

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.

Adding tags or key/value pairs during read

Postby kverbist » Tue Nov 24, 2015 3:34 pm

Hello,

I am writing a software application which involves Omero. Currently I have made a custom MRCReader.java file which is able to handle the MRC 2014 format. The problem is that apparently meta data is not queryable. So I am hoping that I can automatically generate tags, or descriptions during the MRC reading process. Is this possible, and if yes, where do I start?

Regards,
KVerbist
kverbist
 
Posts: 16
Joined: Mon Nov 16, 2015 10:51 am

Re: Adding tags or key/value pairs during read

Postby sbesson » Wed Nov 25, 2015 2:40 pm

Hi,

could you tell us more on how the metadata is stored in your custom reader: is it stored in the OMEXMLMetadataStore or in the global/series metadata tables? Also are you looking at retrieving this metadata using Bio-Formats or OMERO API?

Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Adding tags or key/value pairs during read

Postby kverbist » Wed Nov 25, 2015 4:05 pm

Hello,

Basically like this:

in.seek(HEADER_SIZE);
addGlobalMeta("a_tilt", in.readFloat());
addGlobalMeta("b_tilt", in.readFloat());

addGlobalMeta("x_stage", in.readFloat());
addGlobalMeta("y_stage", in.readFloat());
addGlobalMeta("z_stage", in.readFloat());

So it would be great if I could also immediately create key/value pairs at this point between a_tilt, b_tilt, etc. and their respective values.

Regards,
KVerbist
kverbist
 
Posts: 16
Joined: Mon Nov 16, 2015 10:51 am

Re: Adding tags or key/value pairs during read

Postby sbesson » Wed Nov 25, 2015 5:22 pm

Hi,

in.seek(HEADER_SIZE);
addGlobalMeta("a_tilt", in.readFloat());
addGlobalMeta("b_tilt", in.readFloat());


undertstood, so this is metadata not covered by the model that you are currently storing as key/values in the global metadata table.

So it would be great if I could also immediately create key/value pairs at this point between a_tilt, b_tilt, etc. and their respective values.


At the Bio-Formats API level, these values should be stored in the Metadata table and FormatReader.getGlobalMetadata will return it as a Hashtable.

From viewtopic.php?f=6&t=7951&p=16489#p16489, I suspect you want these key/values to be retrievable from the OMERO API after importing the file? Maybe we can migrate to the other thread to discuss the OMERO API options.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest