[ome-devel] OMERO: load annotations of projects and datasets
Tom Kazimiers
tom at voodoo-arts.net
Tue Jun 5 19:25:04 BST 2012
Will,
thanks for your reply, I made some progress.
On 05.06.2012 16:56, Will Moore wrote:
> If you want to use the Java API, look under this bullet point on the OmeroJava page:
>
> Load all the annotations with a given namespace linked to images.
>
> Projects and Datasets can be treated in the same way as Images when loading annotations.
Okay, so I managed to load my tag annotations in the namespace
"test_namespace" with:
nsToInclude = ArrayList()
nsToInclude.add( "test_namespace" )
nsToExclude = ArrayList()
proxy = entry.getMetadataService()
annotations = proxy.loadSpecifiedAnnotations(TagAnnotationI.canonicalName, nsToInclude, nsToExclude, param)
Now it isn't clear to me how I restrict this annotation loading
to annotations from a specific project or a dataset. I added to
a dataset and a project one tag annotation in namespace
"test_namespace". When I retrieve annotations like above I get
all annotations.
So is it possible to load project and dataset annotations
separately with this way? The documentation[1] lets me suspect
that proxy.loadAnnotations(…) might be of use here. However, I
couldn't find a correct parameterization for that method -- I
couldn't find out what exactly I have to put there as
"rootType".
And how would I do lazy loading myself to use the applications
I tried in the first place?
> However, since you're using Jython, I wondered if the OmeroPy page would be more useful than OmeroJava?
>
> http://trac.openmicroscopy.org.uk/ome/wiki/OmeroPy
>
> In Python we have a "Blitz Gateway" which is a client side library that does a lot of lazy loading of the graph, so you can do
>
> dataset = conn.getObject("Dataset", datasetId)
> for ann in dataset.listAnnotations():
> print ann
> which is loading the Annotations on the fly.
This would be definitely of help. However for my application
it was easier to have it done with OmeroJava as I will probably
move to Java once I got a better understanding of OMERO. However,
thanks for the suggestion.
Cheers,
Tom
[1] http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/slice2html/omero/api/IMetadata.html#loadAnnotations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20120605/44b52f9e/attachment.pgp>
More information about the ome-devel
mailing list