We're Hiring!

XML annotations - visualizing & search

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please 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

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: XML annotations - visualizing & search

Postby sbesson » Mon Oct 27, 2014 3:15 pm

Hi Yuriy,

The issue should be resolved the same way as the one described in
viewtopic.php?f=13&t=7661.

Regarding the annotationRefIndex argument, you can view it as a counter of all the annotation references within a given Image block. See https://github.com/openmicroscopy/biofo ... .java#L650 for an example of code which is creating multiple annotations of multiple types and linking them to an image where annotationRefIndex gets incremented every time.

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

Re: XML annotations - visualizing & search

Postby yuriy_alexandrov » Mon Oct 27, 2014 3:38 pm

Thanks Sebastien,

Unfortunately the link ( viewtopic.php?f=13&t=7661. ) doesn't work.

I'll try to understand the example You provided, - it looks quite mm.. involved :) .

Best regards,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: XML annotations - visualizing & search

Postby yuriy_alexandrov » Mon Oct 27, 2014 4:11 pm

Good news - adding the last line here makes XMLAnnotations visible as "others".

Code: Select all
          metadata.setXMLAnnotationID(['Annotation:' num2str(index)],index);
          metadata.setXMLAnnotationValue(description,index);
          metadata.setImageAnnotationRef(['Annotation:' num2str(index)],0,index);

small step for a man!!

So, one can discard duplicated Description visualization.. maybe.
However, - these annotations still look like not searchable.
We definitely need something searchable, and tags as well.

Another strange thing - instead of single ModuloalongZ annotation now 2 are displayed (copies - only 1 was specified).

Best regards,
Y.
Last edited by yuriy_alexandrov on Mon Oct 27, 2014 4:30 pm, edited 1 time in total.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: XML annotations - visualizing & search

Postby yuriy_alexandrov » Mon Oct 27, 2014 4:27 pm

...
More good news - the same method worked for fixing tags

Code: Select all
for k=1:numel(tags)
  metadata.setTagAnnotationID(['Annotation:' num2str(n_anno+k)],k-1);
  metadata.setTagAnnotationValue(tags{k},k-1);
  metadata.setImageAnnotationRef(['Annotation:' num2str(n_anno+k)], 0, n_anno+k);
end       

The list of tags was updated for Omero-imported image, which is very encouraging.
It looks like, the only problem remained is searchability for custom XML.

Best,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: XML annotations - visualizing & search

Postby sbesson » Tue Oct 28, 2014 2:19 pm

Hi Yuriy,

as per FullTextBridge, the value of all text annotations, including XML annotations, should be indexed. Note however this indexation is not in a structured form like tag annotations or file annotations.

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

Re: XML annotations - visualizing & search

Postby yuriy_alexandrov » Tue Oct 28, 2014 3:29 pm

Thanks,

As I can see now - XMLAnnotations that I add, aren't included into Omero.Insight/Webclient search scope.
But not sure if that is standard behavior, or it is because I forgot something else.

Another thing - the image description added with the help of

Code: Select all
metadata.setImageDescription(sprintf('first line\nsecondline'), 0);
metadata.setImageDescription(sprintf(description),0);

also looks not searchable.

Unfortunately I have no access to Omero at the moment so I can check tomorrow if any suggestion arises.
Please let me know if sending generated file might help.

Best,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: XML annotations - visualizing & search

Postby sbesson » Tue Oct 28, 2014 3:52 pm

Hi Yuriy,

if the image cannot be searched by description then an issue likely lies with at your server level not at the image writing level. Did you check and optionally fix the search indexer after upgrading to 5.0.x? Did you check that images are searchable either by name of descriptions? See https://www.openmicroscopy.org/site/sup ... earch.html for more information.

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

Re: XML annotations - visualizing & search

Postby yuriy_alexandrov » Tue Oct 28, 2014 4:29 pm

Very good, many thanks - will investigate the issue, maybe get some help from server admin.
Will be back when something new appears.

Best,
Y.

PS
I remember importing this generated OME.tiff into Octopus, and it wasn't searchable there as well.
Will re-check tomorrow.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest