[ome-devel] roiService returns incorrect roi position

Wood, Christopher CJW at stowers.org
Thu Sep 8 22:20:24 BST 2011


Ignore most of my previous email.

This works fine for rectangles, but for an ellipse ROI cx,cy, rx, and ry never change when moving the roi or changing the shape. The transform property changes if the ellipse is rotated. What are the values in the transform matrix?

I am considering doing some measurements with the ROIs - is there a recommend way to get the pixel values from inside the ROI?

Thanks,
Chris
From: ome-devel-bounces at lists.openmicroscopy.org.uk [mailto:ome-devel-bounces at lists.openmicroscopy.org.uk] On Behalf Of Wood, Christopher
Sent: Thursday, September 08, 2011 3:12 PM
To: ome-devel at lists.openmicroscopy.org.uk
Subject: [ome-devel] roiService returns incorrect roi position

Hi,

**Omero 4.3.1

I am creating ROIs in insight and then using the python API to get the position of the ROI;I copied mostly from the examples in the scripts.
(I am running this on client computer)

roiService = conn.getRoiService()
result = roiService.findByImage(imageId, None)

for roi in result.rois:
     for shape in roi.copyShapes():
        print shape.id.val
        print shape.getX().getValue()
        print shape.getY().getValue()

(This also happens with an ellipse)
After creating the ROI and running this, it prints the correct information. If I move the ROI (and save) and run  this, it still prints original values.

This also occurs in the ROI Split Figure script (running on the server). After moving the ROI the created image is still for the original position of the ROI.

In Insight, the position of the ROI is always where I last moved it to - even after closing and restarting.
Thanks
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20110908/6003c0ed/attachment.html>


More information about the ome-devel mailing list