Chepe,
There is no need to have the images visible in the screen to do whatever on
them. In this case, you can open the image from a plugin and execute the
doWand(x,y) on it without ever showing the image:
// open and set active
ImagePlus imp = new Opener().openImage("/path/to/image.tif");
if (null == imp) return;
WindowManager.setTempCurrentImage(imp);
// analyze
IJ.doWand(x, y);
IJ.run("Measure");
// If you would like to put in any other kind of ROI, simply create it (it's
an object) and add it to the ImagePlus:
int[] xpoints = new int[]{0, 100, 100, 0};
int[] ypoints = new int[]{0, 0, 100, 100};
Roi roi = new PolygonRoi(xpoints, ypoints, xpoints.length, Roi.POLYGON);
imp.setRoi(roi);
IJ.run("Measure");
// And don't forget to cleanup after being finished with the image!
// cleanup
imp.flush();
WindowManager.setTempCurrentImage(null);
Albert
--
Albert Cardona
Molecular Cell Developmental Biology
University of California Los Angeles
Tel +1 310 2067376
Programming:
http://www.pensament.net/java/Research:
http://www.mcdb.ucla.edu/Research/Hartenstein/Web design:
http://www.pixelets.com