Relationship between MapAnnotationData and MapAnnotationI?
Posted: Mon Jan 28, 2019 4:05 pm
Hello,
Now I'm trying to add MapAnnotation using Java Gateway from MATLAB.
In the client-session approach, ``writeMapAnnotation.m`` and ``linkAnnotation.m`` were used.
``writeMapAnnotation()`` returns a MapAnnotationI object saved in OMERO and ``linkAnnotation()`` can link that to an image.
Reading this (https://github.com/ome/omero-matlab/issues/5), I thought I should make ``writeMapAnnotation`` accept gateway in place of session. There seems no Gateway equivalent of ``linkAnnotation.m``
``writeMapAnnotation`` returns a MapAnnotationI object. However, DataManagerFacility.attachAnnotation takes ``MapAnnotationData`` object rather than ``MapAnnotationI``. So I needed to construct a ``MapAnnotationData`` object.
, where ``ma`` is ``MapAnnotationI``, was easy to be done. And that was followed by
This actually worked.
I've noticed the saved MapAnnotation's Id (confirmed from OMERO.web GUI) is that of ``mad`` rather than that of ``ma``. I'm wondering why?
There seems no way to retrieve MapAnnotationI object from MapAnnotationData. What's the relationship between them?
Best,
Kouichi
Now I'm trying to add MapAnnotation using Java Gateway from MATLAB.
In the client-session approach, ``writeMapAnnotation.m`` and ``linkAnnotation.m`` were used.
``writeMapAnnotation()`` returns a MapAnnotationI object saved in OMERO and ``linkAnnotation()`` can link that to an image.
Reading this (https://github.com/ome/omero-matlab/issues/5), I thought I should make ``writeMapAnnotation`` accept gateway in place of session. There seems no Gateway equivalent of ``linkAnnotation.m``
``writeMapAnnotation`` returns a MapAnnotationI object. However, DataManagerFacility.attachAnnotation takes ``MapAnnotationData`` object rather than ``MapAnnotationI``. So I needed to construct a ``MapAnnotationData`` object.
- Code: Select all
mad = MapAnnotationData(ma)
, where ``ma`` is ``MapAnnotationI``, was easy to be done. And that was followed by
- Code: Select all
mad2 = dmf.attachAnnotation(ctx,mad,image1)
This actually worked.
I've noticed the saved MapAnnotation's Id (confirmed from OMERO.web GUI) is that of ``mad`` rather than that of ``ma``. I'm wondering why?
There seems no way to retrieve MapAnnotationI object from MapAnnotationData. What's the relationship between them?
Best,
Kouichi