I am a newbie to ImageJ and was trying to recreate the following macro using Python (in ImageJ macro editor).
s = selectionType();
if( s == -1 ) {
exit("There was no selection.");
} else if( s != 10 ) {
exit("The selection wasn't a point selection.");
} else {
getSelectionCoordinates(xPoints,yPoints);
x = xPoints[0];
y = yPoints[0];
showMessage("Got coordinates ("+x+","+y+")");
}
The problem is, I don't know how to import selectionType() and getSelectionCoordinates() builtin functions. I get NameError when I try to use them in the Python Code.
Any ideas?
Thanks, Alex