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

Method saveOverlay

ij/src/main/java/ij/Undo.java:99–106  ·  view source on GitHub ↗

This function should be called from PlugInFilters that modify the overlay prior to the operation. For the type 'FILTER', undo of overlays requires that the modified image also has an overlay.

(ImagePlus imp)

Source from the content-addressed store, hash-verified

97 /** This function should be called from PlugInFilters that modify the overlay prior to the operation.
98 * For the type 'FILTER', undo of overlays requires that the modified image also has an overlay. */
99 public static void saveOverlay(ImagePlus imp) {
100 Overlay overlay = imp!=null?imp.getOverlay():null;
101 if (overlay!=null) {
102 overlayCopy = overlay.duplicate();
103 overlayImageID = imp.getID();
104 } else
105 overlayCopy = null;
106 }
107
108 public static void reset() {
109 //if (IJ.debugMode) IJ.log("Undo.reset: "+ whatToUndo+" "+impCopy);

Callers 4

setupMethod · 0.95
runMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95

Calls 3

duplicateMethod · 0.95
getIDMethod · 0.80
getOverlayMethod · 0.45

Tested by

no test coverage detected