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

Method saveRoi

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

Source from the content-addressed store, hash-verified

2355 }
2356
2357 public void saveRoi() {
2358 Roi roi2 = roi;
2359 if (roi2!=null) {
2360 roi2.endPaste();
2361 Rectangle r = roi2.getBounds();
2362 if ((r.width>0 || r.height>0)) {
2363 Roi.setPreviousRoi(roi2);
2364 if (IJ.debugMode) IJ.log("saveRoi: "+roi2);
2365 }
2366 if ((roi2 instanceof PointRoi) && ((PointRoi)roi2).promptBeforeDeleting()) {
2367 PointRoi.savedPoints = (PointRoi)roi2.clone();
2368 if (IJ.debugMode) IJ.log("saveRoi: saving multi-point selection");
2369 }
2370 }
2371 }
2372
2373 public void restoreRoi() {
2374 if (Toolbar.getToolId()==Toolbar.POINT && PointRoi.savedPoints!=null) {

Callers 9

showMethod · 0.95
deleteRoiMethod · 0.95
selectWindowMethod · 0.95
setCurrentWindowMethod · 0.95
makeSelectionMethod · 0.95
selectImageMethod · 0.95
closeMethod · 0.95
makePolygonMethod · 0.95
makeEllipseMethod · 0.95

Calls 6

endPasteMethod · 0.95
getBoundsMethod · 0.95
setPreviousRoiMethod · 0.95
logMethod · 0.95
cloneMethod · 0.95
promptBeforeDeletingMethod · 0.80

Tested by

no test coverage detected