|
Hi,
On Thu, 27 May 2010, Cazic_Thule wrote:
> public class poly_ implements PlugInFilter {
Here, you want to have a field "ImagePlus image;"
> public int setup (String arg, ImagePlus im) {
Here, you want to save the ImagePlus: "image = im;"
> return DOES_8G; //This is to let it except 8bit grayscale
> }
>
> public void run (ImageProcessor ip) {
> int x[] = {10,20,10,20};
> int y[] = {10,10,20,20};
> Roi p = new PolygonRoi(x, y, 4, Roi.POLYGON);
Here, you want to set the ROI: "image.setRoi(p);"
> ip.getPolygon();
> }
> }
Ciao,
Johannes
|