Re: Converting ROIs
Posted by
Andy Weller on
Aug 04, 2006; 3:57pm
URL: http://imagej.273.s1.nabble.com/Converting-ROIs-tp3701905p3701909.html
Yep, this is strange - it must have something to do with run("Create
Selection") and the composite selection it produces.
Using your method does indeed store all coordinates, but I am still
getting just a box with run("Create Selection")?!
Thanks, Andy
On Fri, 2006-08-04 at 11:51 +0100, Gabriel Landini wrote:
> 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.