MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / okToDeleteRoi

Method okToDeleteRoi

ij/src/main/java/ij/ImagePlus.java:2330–2345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2328 }
2329
2330 public boolean okToDeleteRoi() {
2331 if (roi!=null && (roi instanceof PointRoi) && getWindow()!=null && ((PointRoi)roi).promptBeforeDeleting()) {
2332 int npoints = ((PolygonRoi)roi).getNCoordinates();
2333 int counters = ((PointRoi)roi).getNCounters();
2334 String msg = "Delete this multi-point selection ("+npoints+" points, "+counters+" counter"+(counters>1?"s":"")+")?";
2335 GenericDialog gd=new GenericDialog("Delete Points?");
2336 gd.addMessage(msg+"\nRestore using Edit>Selection>Restore Selection.");
2337 gd.addHelp(PointToolOptions.help);
2338 gd.setOKLabel("Keep");
2339 gd.setCancelLabel("Delete");
2340 gd.showDialog();
2341 if (gd.wasOKed())
2342 return false;
2343 }
2344 return true;
2345 }
2346
2347 /** Deletes the current region of interest. */
2348 public void killRoi() {

Callers 15

runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.80
rotateMethod · 0.80
enlargeMethod · 0.80
fitCircleMethod · 0.80
createEllipseMethod · 0.80
convexHullMethod · 0.80
toBoundingBoxMethod · 0.80
fitRectangleMethod · 0.80

Calls 10

getWindowMethod · 0.95
addMessageMethod · 0.95
addHelpMethod · 0.95
setOKLabelMethod · 0.95
setCancelLabelMethod · 0.95
showDialogMethod · 0.95
wasOKedMethod · 0.95
promptBeforeDeletingMethod · 0.80
getNCoordinatesMethod · 0.80
getNCountersMethod · 0.80

Tested by

no test coverage detected