I have followed your tutorial (OMERO Python language bindings — OMERO 5.6.1 documentation) to use Python to delete a shape for an image in the omero server. I was able to successfully delete the shape, but the number of ROIs in the web UI doesn’t change.
Here is a snapshot attached. Could you look into it and help me out here?
Its okay if you just point out where I need to do the change in the omero-iviewer for the update.
result = roi_service.findByImage(imageId, None)
for roi in result.rois:
for s in roi.copyShapes():
# Find and remove the Shape we added above
if s.getTextValue() and s.getTextValue().getValue() == “test-Ellipse”:
print(“Removing Shape from ROI…”)
roi = updateService.saveAndReturnObject(roi)