user prompt to draw oval
Posted by
Peter Oslanec-2 on
URL: http://imagej.273.s1.nabble.com/user-prompt-to-draw-oval-tp5018181.html
Hi all,
I am trying to creeate little script to prompt user to draw oval in a
picture.
setTool("oval");
waitForUser("....");
if (selectionType==-1)
exit("Area selection required");
List.setMeasurements;
//print(List.getList); // list all measurements
x = List.getValue("X");
y = List.getValue("Y");
width = List.getValue("Major");
heigth = List.getValue("Minor");
makeOval(x,y,width,heigth);
The macro works, but the drawn oval moves its center slightly to the right
bottom corner of the picture.
Thank you!
--
Peter Oslanec
Institute of materials and machine mechanics
Slovak Academy of Sciences
Racianska 75
831 02 Bratislava
Slovakia
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html