[ome-users] Append "original metadata" to already imported images

Josh Moore josh at glencoesoftware.com
Thu Mar 10 16:55:17 GMT 2016


Hi Thomas,

On Wed, Mar 9, 2016 at 11:12 AM, Thomas Julou
<thomas.julou at normalesup.org> wrote:
> Following the productive discussion on importing micro-manager’s metadata
> for stack files, I realised that it would be very useful for us to have also
> a way to append those a posteriori. I’m thinking of an omero script that
> would read the relevant tif tag in the original file, parse the
> corresponding JSON and append metadata if they don’t already exist…

A starting point for reading out the TIFF tag (in a Python script) is
in https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7612


> Because I’m not familiar with omero scripts, I would like to know first
> whether appending “original metadata” to an already imported image is doable
> through the script API.

The original metadata section is parsed on the fly from the fileset by
Bio-Formats. So, it might be doable, but tricky, since it will
potentially require adding to and re-ordering the fileset. And due to
the various issues discussed recently, I'm not completely sure that it
will do what you need. If it *would* work, then I would also thinking
upgrading to a later version of Bio-Formats (on the server-side) would
show you the results anyway.

Other options I can think of:

 * re-import the files (never a great thing to suggest, I know, but
often the most practical)
 * store the parsed json data in an annotation (which also appears in
the right hand panel) rather than trying to get it into the original
metadata. The primary downside of this is that for newer imported
files the metadata you're looking for (I think!) will be in original
metadata, while in older filesets, it will be in an annotation.


> If yes, a simplistic example would extremely useful
> as a starting point.

Probably worth a bit more back and forth to make sure you're going to
get something that does what you want.


> Thank you very much for your help. Best,

All the best,
~Josh.


More information about the ome-users mailing list