After running ParticleAnalyzer, I clear the Result window using
IJ.run("Clear results...",""); select another image using. IJ.selectWindow(impAry[1].getTitle()); and run the measurement command there as well calling measure. In total the code is: IJ.run("Clear Results", ""); IJ.selectWindow(impAry[1].getTitle()); rm.setEditMode(impAry[1], true); rm.runCommand("Show All"); rm.runCommand("Measure"); However there is a problem. The result windows originally contained the columns Area, Mean, Std_dev, Min, Max - but after clearing the window and calling measure I only get Area, Mean and Min, Max as measurements. Where did Std_Dev go? Is there something missing? Thanks |
Hi,
On Mar 3, 2010, at 5:58 PM, Cspr wrote: > After running ParticleAnalyzer, I clear the Result window using > > IJ.run("Clear results...",""); > > select another image using. > > IJ.selectWindow(impAry[1].getTitle()); > > and run the measurement command there as well calling measure. In > total the > code is: > > IJ.run("Clear Results", ""); > IJ.selectWindow(impAry[1].getTitle()); > rm.setEditMode(impAry[1], true); > rm.runCommand("Show All"); > rm.runCommand("Measure"); > > However there is a problem. The result windows originally contained > the > columns Area, Mean, Std_dev, Min, Max - but after clearing the > window and > calling measure I only get Area, Mean and Min, Max as measurements. > Where > did Std_Dev go? Is there something missing? How have you set the measurements to be displayed? For instance, have you run something like this... IJ.run("Set Measurements...", "area standard centroid center perimeter bounding shape feret's display redirect=None decimal=3"); I suppose that you could work with the Analyzer class directly as an alternative. That would be new territory for me, but perhaps something like... Analyzer.setMeasurements(Measurements.AREA + Measurements.STD_DEV); I haven't tested the above, but it might be worth giving it a whirl. Ben > > Thanks > -- > View this message in context: http://n2.nabble.com/STD-DEV-measurement-missing-tp4671103p4671103.html > Sent from the ImageJ mailing list archive at Nabble.com. |
In reply to this post by Cspr
Hi Cspr,
probably it should be IJ.run("Clear Results"); no second argument, no dots. Use Macros>Record to see what the commands look like. Concerning StdDev, did you select it in "Set Measurements..."? Looking at the code, it seems that this could be done by a macro as well (unless you do some heavy number crunching or the like). Michael ________________________________________________________________ On 3 Mar 2010, at 23:58, Cspr wrote: > After running ParticleAnalyzer, I clear the Result window using > > IJ.run("Clear results...",""); > > select another image using. > > IJ.selectWindow(impAry[1].getTitle()); > > and run the measurement command there as well calling measure. In > total the > code is: > > IJ.run("Clear Results", ""); > IJ.selectWindow(impAry[1].getTitle()); > rm.setEditMode(impAry[1], true); > rm.runCommand("Show All"); > rm.runCommand("Measure"); > > However there is a problem. The result windows originally contained > the > columns Area, Mean, Std_dev, Min, Max - but after clearing the > window and > calling measure I only get Area, Mean and Min, Max as > measurements. Where > did Std_Dev go? Is there something missing? > > Thanks |
It should be and it was. As for the Std_Dev I was using (Analyzer abbreviated to An)
int measurements = An.STD_DEV + An.MIN_MAX + An.MEAN + An.AREA + An.AREA_FRACTION; and then just setting it An.setMeasurements(measurements); but apparently that doesn't do the trick. Instead running the Set Measurement macro using IJ.run works. Cant figure out why. |
Free forum by Nabble | Edit this page |