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

Method run

ij/src/main/java/ij/plugin/RoiScaler.java:17–39  ·  view source on GitHub ↗
(String arg)

Source from the content-addressed store, hash-verified

15 private boolean centered;
16
17 public void run(String arg) {
18 ImagePlus imp = IJ.getImage();
19 Roi roi = imp.getRoi();
20 if (roi==null) {
21 IJ.error("Scale", "This command requires a selection");
22 return;
23 }
24 if (!IJ.isMacro() && !imp.okToDeleteRoi())
25 return;
26 if (!showDialog())
27 return;
28 if (!IJ.macroRunning()) {
29 defaultXScale = xscale;
30 defaultYScale = yscale;
31 }
32 Roi roi2 = scale(roi, xscale, yscale, centered);
33 if (roi2==null)
34 return;
35 Undo.setup(Undo.ROI, imp);
36 roi = (Roi)roi.clone();
37 imp.setRoi(roi2);
38 Roi.setPreviousRoi(roi);
39 }
40
41 public boolean showDialog() {
42 GenericDialog gd = new GenericDialog("Scale Selection");

Callers

nothing calls this directly

Calls 12

getImageMethod · 0.95
getRoiMethod · 0.95
errorMethod · 0.95
isMacroMethod · 0.95
okToDeleteRoiMethod · 0.95
showDialogMethod · 0.95
macroRunningMethod · 0.95
scaleMethod · 0.95
setupMethod · 0.95
cloneMethod · 0.95
setRoiMethod · 0.95
setPreviousRoiMethod · 0.95

Tested by

no test coverage detected