[ome-devel] Accessing OMERO.insight attachements via the API.
Jerome Avondo
jeromeavondo at msn.com
Wed Jul 22 11:18:57 BST 2009
Hi Bernhard and Jean-Marie,
Thanks for your help, that cleared things up, I now use the IMetadata service to retrieve any annotations attached to an object. That's now working fine.
My next question, which I am a bit stuck with, is say I have an Image with an associated TagAnnotation. How can I remove this tag from being associated to this Image.
I'm guessing I need to get the ImageAnnotationLink object, and delete that via the Gateway object.
So I tried the findImageAnnotationLink() member function of the Image object and supplying it with the existing TagAnnotation object I want to delete, but I seem to always get an empty list back.
Anyway, any pearls of wisdom would be welcome :)
Thanks,
J.
________________________________
> CC: ome-devel at lists.openmicroscopy.org.uk
> From: j.burel at dundee.ac.uk
> Subject: Re: [ome-devel] Accessing OMERO.insight attachements via the API.
> Date: Mon, 20 Jul 2009 18:25:43 +0100
> To: jeromeavondo at msn.com
>
>
> Hi Jerome
>
> You can load all the annotations linked to a given object
> using the loadAnnotations method from IMetadata service
> i.e. tags, ratings, attachments etc.
>
> if a file annotation is returned, the original file (ref to the uploaded file) will be loaded as well
> you can then get the size of the file by doing
>
> FileAnnotation fa;
> size= fa.getFile().getValue();
>
> If you then want to read the original file,
> you will need to use the RawFileStore service
> code example:
> id = fa.getFile().getId().getValue();
> RawFileStorePrx store = getRawFileService();
> store.setFileId(fileID);
> store.read(0, size)
>
>
> hope it helps
>
> Jmarie
_________________________________________________________________
Share your memories online with anyone you want.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
More information about the ome-devel
mailing list