ImageJ base code to get access to all the classes and their methods to test new Plugins. https://imagejdocu.tudor.lu/howto/plugins/the_imagej_eclipse_howto
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
615 B

3 years ago
  1. // This example macro tool creates circular selections.
  2. // Press ctrl-i (Macros>Install Macros) to reinstall after
  3. // making changes. Double click on the tool icon (a circle)
  4. // to set the radius of the circle.
  5. // There is more information about macro tools at
  6. // http://imagej.nih.gov/ij/developer/macro/macros.html#tools
  7. // and many more examples at
  8. // http://imagej.nih.gov/ij/macros/tools/
  9. var radius = 20;
  10. macro "Circle Tool - C00cO11cc" {
  11. getCursorLoc(x, y, z, flags);
  12. makeOval(x-radius, y-radius, radius*2, radius*2);
  13. }
  14. macro "Circle Tool Options" {
  15. radius = getNumber("Radius: ", radius);
  16. }