Re: ParticleAnalyzer output in Java does not agree with program
Posted by Cspr on Mar 02, 2010; 11:55am
URL: http://imagej.273.s1.nabble.com/ParticleAnalyzer-output-in-Java-does-not-agree-with-program-tp3689167p3689169.html
Thanks for your reply.
In the following ParticleAnalyzer has been abbreviated to "PartAn", and Analyzer will be abbreviated to "An" to circumvent the spam detector.
Let me clarify for a moment.
I work on only one picture in this context, so the chance of messing that up doesn't seem likely. I figured out that a major problem I had was not setting the scale right (from pixel to microns does make a difference) and now the call:
IJ.run(imp3, "AnalyzeParticles...", "size=0.15-999999.00 circularity=0-1 show=Nothing display exclude clear include record add");
does indeed work, i.e. it produces the same result as when useing ImageJ as any other program using identical steps. This is good news, however when I try to initialize a ParticleAnalyzer object using:
PartAn pa = new PartAn(options, measurements, null, 0.15, Double.POSITIVE_INFINITY);
with options as:
int options = PartAn.SHOW_RESULTS +
PartAn.EXCLUDE_EDGE_PARTICLES +
PartAn.CLEAR_WORKSHEET +
PartAn.INCLUDE_HOLES +
PartAn.RECORD_STARTS +
PartAn.ADD_TO_MANAGER;
and measurements as:
int measurements = An.STD_DEV + An.MIN_MAX + An.MEAN + An.AREA;
The problem persists. The result-table shows an incredible 411 measurements. I know for a fact the problem is the minSize - the smallest particle size in pixels i.e. the 0.15 parameter. However when in microns I need some form of conversion between them to make it work.
My only solution suggestion was to take the microns-to-pixel ratio (which is something like 14) and multiply it by 0.15 to get the appropriate scale. This did not work.
Can you spot the error?
Thank you.