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

Method setupDialog

ij/src/main/java/ij/plugin/Histogram.java:173–196  ·  view source on GitHub ↗
(ImagePlus imp, int flags)

Source from the content-addressed store, hash-verified

171 }
172
173 int setupDialog(ImagePlus imp, int flags) {
174 int stackSize = imp.getStackSize();
175 if (stackSize>1) {
176 String macroOptions = Macro.getOptions();
177 if (macroOptions!=null) {
178 if (macroOptions.indexOf("stack ")>=0)
179 return flags+PlugInFilter.DOES_STACKS;
180 else
181 return flags;
182 }
183 YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(),
184 "Histogram", "Include all "+stackSize+" images?");
185 if (d.cancelPressed())
186 return PlugInFilter.DONE;
187 else if (d.yesPressed()) {
188 if (IJ.recording())
189 Recorder.recordOption("stack");
190 return flags+PlugInFilter.DOES_STACKS;
191 }
192 if (IJ.recording())
193 Recorder.recordOption("slice");
194 }
195 return flags;
196 }
197
198}

Callers 1

runMethod · 0.95

Calls 8

getOptionsMethod · 0.95
getInstanceMethod · 0.95
cancelPressedMethod · 0.95
yesPressedMethod · 0.95
recordingMethod · 0.95
recordOptionMethod · 0.95
getStackSizeMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected