imagej / imagej-omero

Server- and client-side communication between ImageJ and OMERO
GNU General Public License v2.0
11 stars 10 forks source link

Add Support to Re-attach Annotations #75

Open awalter17 opened 6 years ago

awalter17 commented 6 years ago

Currently, if you download an OMERO object with annotations to ImageJ and then upload a new version of this object to OMERO the annotations are lost.

Example scenario:

  1. In OMERO, you have an image which has a number of annotations (tags, files, etc.)
  2. Download this image to ImageJ, and potentially make some changes
  3. Upload the modified image to OMERO as a new image

In general, the new image which is uploaded should have all the same meta-data as the originally downloaded image (i.e. same description, name, etc.). But it doesn't. The annotations are not preserved.

As I understand annotations in OMERO, to make this happen we'd need to:

  1. Store the annotations of the original OMERO object (annotations are not loaded by default!)
  2. Upload the new object to OMERO, and retrieve it (or possibly just its ID)
  3. Create a link between each of the original annotations and the new object
  4. Upload the links to OMERO

I imagine that this won't be very efficient. So we probably want to make it an option for the user (i.e. detect if the original omero object had annotations and ask the user if they want to preserve them).

We'll need to support this for images, tables, and rois.

joshmoore commented 6 years ago

Happy to help with this, but probably most useful to work from an integration test that shows exactly what should be achieved.