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

Method run

ij/src/main/java/ij/plugin/filter/Filters.java:33–91  ·  view source on GitHub ↗
(ImageProcessor ip)

Source from the content-addressed store, hash-verified

31 }
32
33 public void run(ImageProcessor ip) {
34
35 if (noRoi)
36 ip.resetRoi();
37
38 if (arg.equals("invert")) {
39 ip.invert();
40 slice++;
41 if (imp.getBitDepth()==16 && imp.getStackSize()>1 && slice==imp.getStackSize())
42 imp.resetDisplayRange();
43 return;
44 }
45
46 if (arg.equals("smooth")) {
47 ip.setSnapshotCopyMode(true);
48 ip.smooth();
49 ip.setSnapshotCopyMode(false);
50 return;
51 }
52
53 if (arg.equals("sharpen")) {
54 ip.setSnapshotCopyMode(true);
55 ip.sharpen();
56 ip.setSnapshotCopyMode(false);
57 return;
58 }
59
60 if (arg.equals("edge")) {
61 ip.setSnapshotCopyMode(true);
62 ip.findEdges();
63 ip.setSnapshotCopyMode(false);
64 return;
65 }
66
67 if (arg.equals("add")) {
68 ip.noise(25.0);
69 return;
70 }
71
72 if (arg.equals("noise")) {
73 if (canceled)
74 return;
75 slice++;
76 if (slice==1) {
77 GenericDialog gd = new GenericDialog("Gaussian Noise");
78 gd.addNumericField("Standard Deviation:", sd, 2);
79 gd.showDialog();
80 if (gd.wasCanceled()) {
81 canceled = true;
82 return;
83 }
84 sd = gd.getNextNumber();
85 }
86 ip.noise(sd);
87 IJ.register(Filters.class);
88 return;
89 }
90

Callers

nothing calls this directly

Calls 15

addNumericFieldMethod · 0.95
showDialogMethod · 0.95
wasCanceledMethod · 0.95
getNextNumberMethod · 0.95
registerMethod · 0.95
setSnapshotCopyModeMethod · 0.80
sharpenMethod · 0.80
resetRoiMethod · 0.45
equalsMethod · 0.45
invertMethod · 0.45
getBitDepthMethod · 0.45
getStackSizeMethod · 0.45

Tested by

no test coverage detected