本文整理汇总了Java中ij.measure.ResultsTable.getResultsTable方法的典型用法代码示例。如果您正苦于以下问题:Java ResultsTable.getResultsTable方法的具体用法?Java ResultsTable.getResultsTable怎么用?Java ResultsTable.getResultsTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.measure.ResultsTable
的用法示例。
在下文中一共展示了ResultsTable.getResultsTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showResults
import ij.measure.ResultsTable; //导入方法依赖的package包/类
/**
* Show a Results table containing some performance information
*
* @param duration time elapsed in purifying.
* @param imp the purified image.
* @param slicesPerChunk slices processed by each chunk.
* @param labelMethod labelling method used.
*/
private void showResults(final double duration, final ImagePlus imp, int slicesPerChunk, final int labelMethod) {
if (labelMethod == ParticleCounter.LINEAR)
slicesPerChunk = imp.getImageStackSize();
final ParticleCounter pc = new ParticleCounter();
final int nChunks = pc.getNChunks(imp, slicesPerChunk);
final int[][] chunkRanges = pc.getChunkRanges(imp, nChunks, slicesPerChunk);
final ResultsTable rt = ResultsTable.getResultsTable();
rt.incrementCounter();
rt.addLabel(imp.getTitle());
rt.addValue("Algorithm", labelMethod);
rt.addValue("Threads", Runtime.getRuntime().availableProcessors());
rt.addValue("Slices", imp.getImageStackSize());
rt.addValue("Chunks", nChunks);
rt.addValue("Chunk size", slicesPerChunk);
rt.addValue("Last chunk size", chunkRanges[1][nChunks - 1] - chunkRanges[0][nChunks - 1]);
rt.addValue("Duration (s)", duration);
rt.show("Results");
return;
}
示例2: getInstance
import ij.measure.ResultsTable; //导入方法依赖的package包/类
public static ResultInserter getInstance() {
rt = ResultsTable.getResultsTable();
final String table = "Results";
rt.setNaNEmptyCells(true);
return INSTANCE;
}
示例3: createResultsTable
import ij.measure.ResultsTable; //导入方法依赖的package包/类
/**
* Creates the results table.
*
* @param showJunctions
* the show junctions
*/
private void createResultsTable(boolean showJunctions) {
ResultsTable rt = ResultsTable.getResultsTable();
ResultsTable rtSum = new ResultsTable();
rt.setPrecision(3);
Calibration cal = imp.getCalibration();
for (Lines contours : result) {
for (Line c : contours) {
double meanWidth = 0;
for (int i = 0; i < c.num; i++) {
rt.incrementCounter();
rt.addValue("Frame", contours.getFrame());
rt.addValue("Contour ID", c.getID());
rt.addValue("Pos.", i + 1);
rt.addValue("X", c.col[i] * cal.pixelWidth);
rt.addValue("Y", c.row[i] * cal.pixelHeight);
rt.addValue("Length", c.estimateLength() * cal.pixelHeight);
if (doCorrectPosition && doEstimateWidth) {
rt.addValue("Contrast", Math.abs(c.intensity[i]));
rt.addValue("Asymmetry", Math.abs(c.asymmetry[i]));
}
if (doEstimateWidth) {
rt.addValue("Line width", (c.width_l[i] + c.width_r[i]) * cal.pixelWidth);
meanWidth += c.width_l[i] + c.width_r[i];
rt.addValue("Angle of normal", c.angle[i]);
}
rt.addValue("Class", c.getContourClass().toString().substring(5));
}
rtSum.incrementCounter();
rtSum.addValue("Frame", contours.getFrame());
rtSum.addValue("Contour ID", c.getID());
rtSum.addValue("Length", c.estimateLength() * cal.pixelWidth);
if (doEstimateWidth) {
rtSum.addValue("Mean line width", meanWidth / c.num * cal.pixelWidth);
}
}
}
rt.show("Results");
rtSum.show("Summary");
if (showJunctions) {
ResultsTable rt2 = new ResultsTable();
rt2.setPrecision(0);
for (Junctions junctions : resultJunction) {
for (Junction j : junctions) {
rt2.incrementCounter();
rt2.addValue("Frame", junctions.getFrame());
rt2.addValue("Contour ID 1", j.getLine1().getID());// c.get( j.cont1)
rt2.addValue("Contour ID 2", j.getLine2().getID());
rt2.addValue("X", j.x * cal.pixelWidth);
rt2.addValue("Y", j.y * cal.pixelHeight);
}
}
rt2.show("Junctions");
}
}