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

Method freshStart

ij/src/main/java/ij/plugin/Options.java:241–268  ·  view source on GitHub ↗

Close all images, empty ROI Manager, clear the Results table, clears the Log window and sets "Black background" 'true'.

()

Source from the content-addressed store, hash-verified

239 "Black background" 'true'.
240 */
241 private void freshStart() {
242 String options = Macro.getOptions();
243 boolean keepImages = false;
244 boolean keepResults = false;
245 boolean keepRois = false;
246 if (options!=null) {
247 options = options.toLowerCase();
248 keepImages = options.contains("images");
249 keepResults = options.contains("results");
250 keepRois = options.contains("rois");
251 }
252 if (!keepImages) {
253 if (!Commands.closeAll())
254 return;
255 }
256 if (!keepResults) {
257 if (!Analyzer.resetCounter())
258 return;
259 }
260 if (!keepRois) {
261 RoiManager rm = RoiManager.getInstance();
262 if (rm!=null)
263 rm.reset();
264 }
265 if (WindowManager.getWindow("Log")!=null)
266 IJ.log("\\Clear");
267 Prefs.blackBackground = true;
268 }
269
270 // Delete preferences file when ImageJ quits
271 private void reset() {

Callers 1

runMethod · 0.95

Calls 8

getOptionsMethod · 0.95
closeAllMethod · 0.95
resetCounterMethod · 0.95
getInstanceMethod · 0.95
resetMethod · 0.95
getWindowMethod · 0.95
logMethod · 0.95
containsMethod · 0.45

Tested by

no test coverage detected