void setMeasurements() { String arg = ""; if (interp.nextToken()=='(') { interp.getLeftParen(); if (interp.nextToken() != ')') arg = getString().toLowerCase(Locale.US); interp.getRightParen(); } props.clear(); ImagePlus imp = getImage(); int measurements = ALL_STATS + SLICE; if (arg.contains("limit")) measurements += LIMIT; ImageStatistics stats = imp.getStatistics(measurements); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, measurements, rt); analyzer.saveResults(stats, imp.getRoi()); for (int i=0; i<=rt.getLastColumn(); i++) { if (rt.columnExists(i)) { String name = rt.getColumnHeading(i); String value = ""+rt.getValueAsDouble(i, 0); props.setProperty(name, value); } } }
int getColumnCount(ImagePlus imp, int measurements) { ImageStatistics stats = imp.getStatistics(measurements); ResultsTable rt = new ResultsTable(); rt.showRowNumbers(true); Analyzer analyzer = new Analyzer(imp, measurements, rt); analyzer.saveResults(stats, null); int count = 0; for (int i=0; i<=rt.getLastColumn(); i++) { float[] col = rt.getColumn(i); String head = rt.getColumnHeading(i); if (head!=null && col!=null) count++; } return count; }
/** Measures the ROIs in this overlay on the specified image * and returns the results as a ResultsTable. */ public ResultsTable measure(ImagePlus imp) { ResultsTable rt = new ResultsTable(); rt.showRowNumbers(true); Analyzer analyzer = new Analyzer(imp, rt); for (int i=0; i<size(); i++) { Roi roi = get(i); imp.setRoi(roi); analyzer.measure(); } imp.deleteRoi(); return rt; }
int getColumnCount(ImagePlus imp, int measurements) { ImageStatistics stats = imp.getStatistics(measurements); ResultsTable rt = new ResultsTable(); rt.showRowNumbers(true); Analyzer analyzer = new Analyzer(imp, measurements, rt); analyzer.saveResults(stats, null); int count = 0; for (int i=0; i<=rt.getLastColumn(); i++) { float[] col = rt.getColumn(i); String head = rt.getColumnHeading(i); if (head!=null && col!=null) count++; } return count; }
void setMeasurements() { String arg = ""; if (interp.nextToken()=='(') { interp.getLeftParen(); if (interp.nextToken() != ')') arg = getString().toLowerCase(Locale.US); interp.getRightParen(); } props.clear(); ImagePlus imp = getImage(); int measurements = ALL_STATS + SLICE; if (arg.contains("limit")) measurements += LIMIT; ImageStatistics stats = imp.getStatistics(measurements); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, measurements, rt); analyzer.saveResults(stats, imp.getRoi()); for (int i=0; i<=rt.getLastColumn(); i++) { if (rt.columnExists(i)) { String name = rt.getColumnHeading(i); String value = ""+rt.getValueAsDouble(i, 0); props.setProperty(name, value); } } }
/** Measures the ROIs in this overlay on the specified image * and returns the results as a ResultsTable. */ public ResultsTable measure(ImagePlus imp) { ResultsTable rt = new ResultsTable(); rt.showRowNumbers(true); Analyzer analyzer = new Analyzer(imp, rt); for (int i=0; i<size(); i++) { Roi roi = get(i); imp.setRoi(roi); analyzer.measure(); } imp.deleteRoi(); return rt; }
private static ResultsTable multiMeasure(ImagePlus imp, Roi[] rois, boolean appendResults) { int nSlices = imp.getStackSize(); Analyzer aSys = new Analyzer(imp); // System Analyzer ResultsTable rtSys = Analyzer.getResultsTable(); ResultsTable rtMulti = new ResultsTable();
private static ResultsTable multiMeasure(ImagePlus imp, Roi[] rois, boolean appendResults) { int nSlices = imp.getStackSize(); Analyzer aSys = new Analyzer(imp); // System Analyzer ResultsTable rtSys = Analyzer.getResultsTable(); ResultsTable rtMulti = new ResultsTable();
public void update(int measurements, ImagePlus imp, Roi roi) { if (roi==null && imp!=null) roi = imp.getRoi(); ResultsTable rt2 = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, measurements, rt2); ImageProcessor ip = new ByteProcessor(1, 1); ImageStatistics stats = new ByteStatistics(ip, measurements, null);
float[] values = new float[size]; Calibration cal = imp.getCalibration(); Analyzer analyzer = new Analyzer(imp); int measurements = analyzer.getMeasurements(); boolean showResults = measurements!=0 && measurements!=LIMIT;
public void update(int measurements, ImagePlus imp, Roi roi) { if (roi==null && imp!=null) roi = imp.getRoi(); ResultsTable rt2 = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, measurements, rt2); ImageProcessor ip = new ByteProcessor(1, 1); ImageStatistics stats = new ByteStatistics(ip, measurements, null);
Calibration cal = imp.getCalibration(); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, rt); int measurements = Analyzer.getMeasurements(); boolean showResults = !isPlotMaker && measurements!=0 && measurements!=LIMIT;
if (appendResults && mmResults2!=null) rt = mmResults2; Analyzer analyzer = new Analyzer(imp, measurements2, rt); analyzer.disableReset(true); for (int slice=1; slice<=nSlices; slice++) {
if (appendResults && mmResults2!=null) rt = mmResults2; Analyzer analyzer = new Analyzer(imp, measurements2, rt); analyzer.disableReset(true); for (int slice=1; slice<=nSlices; slice++) {
Calibration cal = imp.getCalibration(); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, rt); int measurements = Analyzer.getMeasurements(); boolean showResults = !isPlotMaker && measurements!=0 && measurements!=LIMIT;
Calibration cal = imp.getCalibration(); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, rt); int measurements = Analyzer.getMeasurements(); boolean showResults = !isPlotMaker && measurements!=0 && measurements!=LIMIT;
Calibration cal = imp.getCalibration(); ResultsTable rt = new ResultsTable(); Analyzer analyzer = new Analyzer(imp, rt); int measurements = Analyzer.getMeasurements(); boolean showResults = !isPlotMaker && measurements!=0 && measurements!=LIMIT;
rt = Analyzer.getResultsTable(); analyzer = new Analyzer(imp, measurements, rt); if (resetCounter && slice==1 && rt.size()>0) { if (!Analyzer.resetCounter())
rt = Analyzer.getResultsTable(); analyzer = new Analyzer(imp, measurements, rt); if (resetCounter && slice==1 && rt.size()>0) { if (!Analyzer.resetCounter())