Posted by
Joachim Wesner on
Mar 11, 2008; 7:51pm
URL: http://imagej.273.s1.nabble.com/Macro-question-test-if-a-point-is-within-selection-ROI-tp3696899p3696907.html
Hi Jon,
in plugin (Java) programming there is a a function contains() that exactly
does what you are looking for, but it really seems to be missing in the
macro language(True ????)
and should be added!?
One way to do this with the current macro capabilities could be to convert
the selection to a binary image and read this into an array. All this could
be put in an subroutine
(including saving and restoring the initial image) for easy access.
Mit freundlichen Grüßen / Best regards
Joachim Wesner
Jonathan Jackson
<
[hidden email]
.UK> An
Gesendet von:
[hidden email]
ImageJ Interest Kopie
Group
<
[hidden email]. Thema
GOV> Macro question: test if a point is
within selection/ROI
11.03.2008 20:32
Bitte antworten
an
ImageJ Interest
Group
<
[hidden email].
GOV>
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
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________