Login  Register

Re: Converting ROIs

Posted by Gabriel Landini on Aug 04, 2006; 11:51am
URL: http://imagej.273.s1.nabble.com/Converting-ROIs-tp3701905p3701908.html

On Friday 04 August 2006 11:33, Andy Weller wrote:
> I have played with this previously without much luck. It seems that
> getSelectionCoordinates(xCoordinates, yCoordinates) just creates a box -
> ie, 4 coordinates instead of all of them. This means I go from a
> composite selection to a box which I don't want.

Not sure what you did, but what I suggested works fine:

// provide a freehand ROI before running.

getSelectionCoordinates(x, y);

//show the ROI coordinates
for (i=0;i<x.length;i++){
 print (""+x[i]+"  "+y[i]);
}

run("Select None");
wait(500); // no ROI now

makeSelection("plygon", x, y);

Cheers,
G.