本文整理了Java中ij.plugin.filter.Analyzer.<init>()
方法的一些代码示例,展示了Analyzer.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.<init>()
方法的具体详情如下:
包路径:ij.plugin.filter.Analyzer
类名称:Analyzer
方法名:<init>
[英]Constructs a new Analyzer using the specified ImagePlus object and the current measurement options and default results table.
[中]使用指定的ImagePlus对象、当前测量选项和默认结果表构造新的分析器。
代码示例来源:origin: net.imagej/ij
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);
}
}
}
代码示例来源:origin: imagej/ImageJA
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;
}
代码示例来源:origin: net.imagej/ij
/** 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;
}
代码示例来源:origin: net.imagej/ij
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;
}
代码示例来源:origin: imagej/ImageJA
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);
}
}
}
代码示例来源:origin: imagej/ImageJA
/** 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;
}
代码示例来源:origin: imagej/ImageJA
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();
代码示例来源:origin: net.imagej/ij
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();
代码示例来源:origin: net.imagej/ij
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);
代码示例来源:origin: sc.fiji/Stack_Manipulation
float[] values = new float[size];
Calibration cal = imp.getCalibration();
Analyzer analyzer = new Analyzer(imp);
int measurements = analyzer.getMeasurements();
boolean showResults = measurements!=0 && measurements!=LIMIT;
代码示例来源:origin: imagej/ImageJA
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);
代码示例来源:origin: net.imagej/ij
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;
代码示例来源:origin: net.imagej/ij
if (appendResults && mmResults2!=null)
rt = mmResults2;
Analyzer analyzer = new Analyzer(imp, measurements2, rt);
analyzer.disableReset(true);
for (int slice=1; slice<=nSlices; slice++) {
代码示例来源:origin: imagej/ImageJA
if (appendResults && mmResults2!=null)
rt = mmResults2;
Analyzer analyzer = new Analyzer(imp, measurements2, rt);
analyzer.disableReset(true);
for (int slice=1; slice<=nSlices; slice++) {
代码示例来源:origin: imagej/ImageJA
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;
代码示例来源:origin: net.imagej/ij
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;
代码示例来源:origin: imagej/ImageJA
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;
代码示例来源:origin: net.imagej/ij
rt = Analyzer.getResultsTable();
analyzer = new Analyzer(imp, measurements, rt);
if (resetCounter && slice==1 && rt.size()>0) {
if (!Analyzer.resetCounter())
代码示例来源:origin: imagej/ImageJA
rt = Analyzer.getResultsTable();
analyzer = new Analyzer(imp, measurements, rt);
if (resetCounter && slice==1 && rt.size()>0) {
if (!Analyzer.resetCounter())
内容来源于网络,如有侵权,请联系作者删除!