Posted by
yccheok on
Aug 10, 2005; 6:41am
URL: http://imagej.273.s1.nabble.com/Get-the-Measurement-Result-through-Java-code-tp3705058.html
Hi, in my java applications, I had made intensive use
on the ImageJ function. However, there is one thing
which stop me from progressing on. May I know how I
can get the measurement result through java code?
For example:
import ij.*;
import ij.process.*;
public class test
{
public static void main(String[] args)
{
IJ.open("C:\\Documents and
Settings\\yccheok\\Desktop\\test.bmp");
ImagePlus imagePlus =
WindowManager.getCurrentImage();
System.out.println("ImagePlus
width="+imagePlus.getWidth());
IJ.run("8-bit");
IJ.run("Threshold");
IJ.run("Set Measurements...", "area bounding display
redirect=None decimal=3");
IJ.run("Measure");
IJ.run("Analyze Particles...", "minimum=1
maximum=999999 bins=20 show=Nothing display");
// How can I get the particles analyze result?????
// ???
// double[] result = IJ.getMeasurementResult();???
}
}
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com