java - Get x and y coordinates into variables in macro ImageJ -


i want able place point in image using point selection tool, read x , y coordinates variable in macro.

i've tried getselectioncoordinates isn't working. don't want display coordinates in log or results window.

any appreciated.

getselectioncoordinates works fine me, e.g.:

s = selectiontype();  if( s == -1 ) {     exit("there no selection."); } else if( s != 10 ) {     exit("the selection wasn't point selection."); } else {     getselectioncoordinates(xpoints,ypoints);     x = xpoints[0];     y = ypoints[0];     showmessage("got coordinates ("+x+","+y+")"); } 

(a common misunderstanding getselectioncoordinates doesn't return value conventionally - have give names of variables it'll set.)


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -