[ome-devel] Issue Updating ROIs

Dominik Lindner (Staff) d.lindner at dundee.ac.uk
Fri May 18 09:36:37 BST 2018


Hi Alison,

you are right. I think the ROIFacility.saveROIs() method tries to do some fancy things
(checks which ROIs/Shapes have to be created, updated, deleted, etc.) and something's going
wrong there. Thanks for providing the code example, helps a lot for replicating/debugging!

For some reason it works for Insight. The method was originally in Insight, I just moved it to
the Gateway. I'll have a closer look into that, and hopefully will fix it soon.

But as you already mentioned, a workaround for now would be to use the DataManagerFacility
for saving the ROIs back to the server, something like:
final DataManagerFacility df = gateway.getFacility(DataManagerFacility.class);
ROIData r = (ROIData) df.saveAndReturnObject(ctx, roi);

Kind Regards,
Dominik


> On 17 May 2018, at 15:46, Alison Walter <wackywalter017 at gmail.com> wrote:
>
> Hello all,
>
> I am having an issue when updating ROIs. I am using OMERO 5.4, and
> coding in Java. When I download ROIs, modify them, and then save them
> back to OMERO the ROIs are not always updated on the server.
>
> A ROI that is not positioned in Z or T, updates fine. However, if the
> ROI is positioned at a Z and T location it does not update on the
> server. So a RectangleData with position Z=1 T=2 would not be updated.
> But a RectangleData with Z=null T=5 would update.
>
> If you take the RectangleData positioned in Z and T and try to update
> it, the ROI returned by the ROIFacility is the un-updated version. But
> if you take that returned ROI and modify that, then the ROI will be
> updated on the server.
>
> Should I not be using the ROIFacility to update ROIs on the server?
> Should I use the DataManagerFacility instead? Or could this be an
> issue with my local system?
>
> Please let me know if you need any additional information from me.
> Here's a gist with the code snippet I was using to test this behavior.
> https://gist.github.com/awalter17/fee62bf0d0b72ab56513fab1a660ce19
>
> Best wishes,
> Alison
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list