Re: ROI object from co-ordinate arrays

Posted by dscho on
URL: http://imagej.273.s1.nabble.com/ROI-object-from-co-ordinate-arrays-tp3701565p3701566.html

Hi Tony,

On Tue, 19 Sep 2006, Tony Shepherd wrote:

> PolygonRoi segpoly = new PolygonRoi(Xcoords, Ycoords, Ncoords, 2);

Just a convention thing: you should use Roi.POLYGON instead of 2, for
readability.

> Roi segROI = (Roi)segpoly;
> ip.setRoi(segROI);

You probably want to set it using imp.setRoi(segROI), i.e. on the
ImagePlus, not the ImageProcessor.

Hth,
Dscho