trouble defining an ROI in python
Posted by
Aryeh Weiss on
URL: http://imagej.273.s1.nabble.com/trouble-defining-an-ROI-in-python-tp5020088.html
I am trying to define an ROI within which teh particle analyzer will
operate.
so I tried the following
imp.setRoi(rm.select(i)) #rm is an existing RoiManager
IJ.run(imp, "Analyze Particles...", "size=1-Infinity summarize
in_situ")
but this measured on the entire image.
I also tried
options = PA.SHOW_SUMMARY
parameters = PA.AREA
rt = ResultsTable()
myPA = PA(options, parameters, rt, 1,100000 )
ip - imp.getProcessor()
roi = rm.select(i)
imp.setRoi(roi)
ip.setRoi(roi)
imp.updateAndDraw()
myPA.analyze(imp, ip)
In both cases, the measurement is done over the entire image, and not
within the ROI.
What am I doing wrong?
--aryeh
--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel
Ph: 972-3-5317638
FAX: 972-3-7384051
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html