Login  Register

Macro question: test if a point is within selection/ROI

Posted by Jonathan Jackson-2 on Mar 11, 2008; 7:32pm
URL: http://imagej.273.s1.nabble.com/Macro-question-test-if-a-point-is-within-selection-ROI-tp3696899.html

Dear All,

Is it possible, in a macro, to find out if a given point lies within the
current selection / ROI.  I'm writing a macro to alter the intensity of
pixels within the selection, but can't figure out how to do this!  

I've looked at getSelectionBounds and getSelectionCoordinates but so far as
I can't see a simple way to go from these to the coordinates of pixels
within the region.

thanks,
Jon