Re: Getting coordinates inside a ROI
Posted by
Peter Mc on
URL: http://imagej.273.s1.nabble.com/Getting-coordinates-inside-a-ROI-tp5003250p5003280.html
Thanks Wayne;
I am afraid cannot get why is much faster...
I do not need to get the the pixel value(just X,Y coordinates),so getting the bounds is enough for the coordinates (Rectangle coordinates). Using some ROIs as ovals or ellipses some points inside the rectangle could not be inside the ROI but the method
contains() fixes this issue quite good; sure I could avoid the method contains() establishing some restrictions over X and Y in the loop,but I think is not necessary get more complicated the code in my case.
Actually I was looking for a direct way, don't know something close to :
Point getROIPoints(Roi roi) { }
Thank you for you answer and please let me know if you have a better idea than mine,haha.
Research engineer
HGGM. Madrid.