Getting coordinates inside a ROI

Posted by Peter Mc on
URL: http://imagej.273.s1.nabble.com/Getting-coordinates-inside-a-ROI-tp5003250.html

Hi everyone;

I am working in a plugin where the user can select different ROIs using a ROI manager,these ROIs could be different types(OvalRoi,Rectangle,Ellipse,etc). I need to get the coordinates of all the points inside the ROI; is trivial to get the perimeter coordinates but I cannot find a simple way for the points inside.
My solution is using the method contain and iterate over the perimeter coordinates.

I think must be an easier way... Am I missing something?

Thanks in advance.

PD: contain method work properly even with freehand ROIs.
Research engineer
HGGM. Madrid.