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

Method run

ij/src/main/java/ij/plugin/Binner.java:32–46  ·  view source on GitHub ↗
(String arg)

Source from the content-addressed store, hash-verified

30 private float maxValue;
31
32 public void run(String arg) {
33 ImagePlus imp = IJ.getImage();
34 if (!showDialog(imp))
35 return;
36 if (imp.getStackSize()==1)
37 Undo.setup(Undo.TYPE_CONVERSION, imp);
38 imp.startTiming();
39 ImagePlus imp2 = shrink(imp, xshrink, yshrink, zshrink, method);
40 IJ.showTime(imp, imp.getStartTime(), "", imp.getStackSize());
41 if (!imp2.isHyperStack())
42 imp.setStack(imp2.getStack());
43 imp.setCalibration(imp2.getCalibration());
44 if (zshrink>1)
45 imp.setSlice(1);
46 }
47
48 public ImagePlus shrink(ImagePlus imp, int xshrink, int yshrink, int zshrink, int method) {
49 this.xshrink = xshrink;

Callers

nothing calls this directly

Calls 14

getImageMethod · 0.95
showDialogMethod · 0.95
getStackSizeMethod · 0.95
setupMethod · 0.95
startTimingMethod · 0.95
shrinkMethod · 0.95
showTimeMethod · 0.95
getStartTimeMethod · 0.95
isHyperStackMethod · 0.95
setStackMethod · 0.95
getStackMethod · 0.95
setCalibrationMethod · 0.95

Tested by

no test coverage detected