public void run(String arg) { String dir = IJ.getDirectory("Choose a Folder"); if (dir==null) return; String[] list = (new File(dir)).list(); if (list==null) return; Analyzer.setMeasurement(Measurements.LABELS, true); for (int i=0; i<list.length; i++) { if (list[i].startsWith(".")) continue; String path = dir + list[i]; IJ.showProgress(i+1, list.length); IJ.redirectErrorMessages(true); ImagePlus imp = !path.endsWith("/")?IJ.openImage(path):null; IJ.redirectErrorMessages(false); if (imp!=null) { IJ.run(imp, "Measure", ""); imp.close(); } else if (!path.endsWith("/")) IJ.log("IJ.openImage() returned null: "+path); } }
public void run(String arg) { String dir = IJ.getDirectory("Choose a Folder"); if (dir==null) return; String[] list = (new File(dir)).list(); if (list==null) return; Analyzer.setMeasurement(Measurements.LABELS, true); for (int i=0; i<list.length; i++) { if (list[i].startsWith(".")) continue; String path = dir + list[i]; IJ.showProgress(i+1, list.length); IJ.redirectErrorMessages(true); ImagePlus imp = !path.endsWith("/")?IJ.openImage(path):null; IJ.redirectErrorMessages(false); if (imp!=null) { IJ.run(imp, "Measure", ""); imp.close(); } else if (!path.endsWith("/")) IJ.log("IJ.openImage() returned null: "+path); } }
Prefs.blackBackground = state; else if (arg1.startsWith("display lab")) Analyzer.setMeasurement(LABELS, state); else if (arg1.startsWith("limit to")) Analyzer.setMeasurement(LIMIT, state); else if (arg1.startsWith("add to")) Analyzer.setMeasurement(ADD_TO_OVERLAY, state); else if (arg1.equals("area")) Analyzer.setMeasurement(AREA, state); else if (arg1.equals("mean")) Analyzer.setMeasurement(MEAN, state); else if (arg1.startsWith("perim")) Analyzer.setMeasurement(PERIMETER, state); else if (arg1.equals("stack position")) Analyzer.setMeasurement(STACK_POSITION, state); else if (arg1.startsWith("std")) Analyzer.setMeasurement(STD_DEV, state); else if (arg1.equals("showrownumbers")) ResultsTable.getResultsTable().showRowNumbers(state);
Prefs.blackBackground = state; else if (arg1.startsWith("display lab")) Analyzer.setMeasurement(LABELS, state); else if (arg1.startsWith("limit to")) Analyzer.setMeasurement(LIMIT, state); else if (arg1.startsWith("add to")) Analyzer.setMeasurement(ADD_TO_OVERLAY, state); else if (arg1.equals("area")) Analyzer.setMeasurement(AREA, state); else if (arg1.equals("mean")) Analyzer.setMeasurement(MEAN, state); else if (arg1.startsWith("perim")) Analyzer.setMeasurement(PERIMETER, state); else if (arg1.equals("stack position")) Analyzer.setMeasurement(STACK_POSITION, state); else if (arg1.startsWith("std")) Analyzer.setMeasurement(STD_DEV, state); else if (arg1.equals("showrownumbers")) ResultsTable.getResultsTable().showRowNumbers(state);
private void resetOptions() { // Reset plugin parameters Prefs.set(PREFS_KEY, null); currentBooleanPrefs = UNSET_PREFS; Prefs.set(HASHMAP_KEY, null); hashMapString = ""; // Reset Sholl metrics and output options Prefs.set(METRICS_KEY, null); Prefs.set(METRICS_KEY + ".comment", null); Prefs.set(MASK_KEY, null); Prefs.set(MASK_KEY + ".type", null); setPlotOutput(DEFAULT_PLOT_OUTPUT); currentMetrics = UNSET_PREFS; commentString = null; maskBackground = UNSET_PREFS; maskType = UNSET_PREFS; // Reset Analyzer prefs Analyzer.setPrecision(3); Analyzer.setMeasurement(Measurements.SCIENTIFIC_NOTATION, false); // Reset other global IJ prefs Prefs.setThreads(Runtime.getRuntime().availableProcessors()); Prefs.set("options.ext", null); }
Prefs.set("options.ext", extension); Analyzer.setPrecision(Math.min(Math.max((int) gd.getNextNumber(), 0), 9)); Analyzer.setMeasurement(Measurements.SCIENTIFIC_NOTATION, gd.getNextBoolean());