Page 1 of 2

XML annotations - visualizing & search

PostPosted: Tue Oct 21, 2014 3:45 pm
by yuriy_alexandrov
Hi All,

I noticed that 5.0.5+ Omero.Insight and Webclient don't display any XML annotations other than Modulo.
That is pity - as such quick assessment of custom metadata is very handy.

Also there is question on search inside XML annotation, say to get Value by Key, etc. - is there any tools that would look for tags, etc? I presume not, but if something else is known on this topic, it would be nice to know.

Thanks,
Y.

Re: XML annotations - visualizing & search

PostPosted: Wed Oct 22, 2014 10:01 am
by jburel
Hi Yuriy

The XML Annotations should be displayed on the right-hand side under "others"
If this is not the case, this is a bug than we will have to fix.
You will have to write your own parser, we not have a build-in parser for any XML annotation.
For modulo, we do know what to expect so we can extract for example the start and end values, the step so we can correctly visualise the image.
What are you trying to achieve? Do you add extra metadata in this xml file?

Cheers
Jmarie

Re: XML annotations - visualizing & search

PostPosted: Wed Oct 22, 2014 10:29 am
by wmoore
Hi Yuriy,

If you want to be able to do specific Lucene key/value searches on a custom data structure, you can add a search bridge to tell Lucene how to index the XML.
https://www.openmicroscopy.org/site/sup ... idges.html

There's a lot on the forums about this from user 'bhcho', since they wrote a parser for OMERO.editor xml files:
E.g.
viewtopic.php?f=6&t=553
viewtopic.php?f=6&t=934&p=3408
and you can find more by searching forums!

Re: XML annotations - visualizing & search

PostPosted: Wed Oct 22, 2014 1:32 pm
by yuriy_alexandrov
Thanks Will, Jmarie,

Yes for OPT data, we add additional metadata as XML annotations.

For our files (OME.tiffs), one can use Bio-Formats Viewer to examine these metadata, but when image is uploaded to Omero, it's different.

Webclient and Omero.Insight (5.0.5) show the Modulo if it is there, but no additional XML Annotations from "StructuredAnnotation" block. Yes it looks like the bug.

So I think something like Bio-Formats Viewer would be useful in Webclient and Omero.Insight, or (presumably simpler) option - just to fix it to see StructuredAnnotations.

On search - in Insight's "Search" chapter, there is "Annotations" option - very impressive, but as I saw, limited by "FileAnnotation" only.
If one could extend it for "XMLAnnotation" type, - that would be very useful, too.

Best,
Y.

Re: XML annotations - visualizing & search

PostPosted: Thu Oct 23, 2014 8:32 am
by jburel
Hi Yuriy

Could you send us a sample file so we can investigate the issue?

Thanks

Jmarie

Re: XML annotations - visualizing & search

PostPosted: Thu Oct 23, 2014 10:32 am
by jburel
Thanks Yuriy for the file

Jmarie

Re: XML annotations - visualizing & search

PostPosted: Thu Oct 23, 2014 10:41 am
by yuriy_alexandrov
Thanks Jmarie,

I've sent the file to Your (dundee.ac.uk) e-mail.

There is another related question that appeared just today - we would like to add TagAnnotations to these OME.tiffs, as well.

I can create TagAnnotation as

Code: Select all
tag  = ome.xml.model.TagAnnotation();

but not sure how to set value and incorporate it into the metadata.

In the case of "modulo", it was

Code: Select all
    modulo = loci.formats.CoreMetadata();
...
    OMEXMLService = loci.formats.services.OMEXMLServiceImpl();
    OMEXMLService.addModuloAlong(metadata, modulo, 0);
...

Is it worth opening another (hopefully not long :) ) thread on that?

Best,
Y.

Re: XML annotations - visualizing & search

PostPosted: Sun Oct 26, 2014 9:31 pm
by jburel
Discussion about TagAnnotation moved to viewtopic.php?f=13&t=7661

Re: XML annotations - visualizing & search

PostPosted: Mon Oct 27, 2014 12:02 pm
by jburel
Hi Yuriy

I had a look at the file you sent me.
Only the XML modulo annotation is linked to the image, the other ones aren't.
You will need to add the annotation ref in order to link the annotations to the image.
That will explain why the annotations are not displayed.

Cheers
Jmarie

Re: XML annotations - visualizing & search

PostPosted: Mon Oct 27, 2014 2:47 pm
by yuriy_alexandrov
Thanks Jmarie,

Most likely, I should use this -

Code: Select all
setXMLAnnotationAnnotationRef
public void setXMLAnnotationAnnotationRef(String annotation,
                                 int XMLAnnotationIndex,
                                 int annotationRefIndex)

First 2 parameters I can deduce form previous usage, but on the third one, not sure.
Is it OK just to put 0 there? or the same XMLAnnotationIndex?
[update - tried both neither works]

Other words, - what is the difference between XMLAnnotationIndex and XMLAnnotationRefIndex?
(This is single-image case.. for now).

TagAnnotations also aren't visible, could it be because of the same reason - could setTagAnnotationRef help?

Last thing I did - I also put these custom XMLs into Image Description - this way, it becomes visible in Insight/Omeroweb viewers, but still not searchable..
Certainly if XMLAnnotation worked I wouldn't even try.. but maybe good to know just for the case (there is no setImageDescriptionRef method)..

Best regards, thanks again,
Y.