ij.measure.ResultsTable.getColumnAsDoubles()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中ij.measure.ResultsTable.getColumnAsDoubles方法的一些代码示例,展示了ResultsTable.getColumnAsDoubles的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResultsTable.getColumnAsDoubles方法的具体详情如下:
包路径:ij.measure.ResultsTable
类名称:ResultsTable
方法名:getColumnAsDoubles

ResultsTable.getColumnAsDoubles介绍

[英]Returns a copy of the given column as a double array, or null if the column is empty.
[中]以双数组形式返回给定列的副本,如果该列为空,则返回null。

代码示例

代码示例来源:origin: ca.mcgill/Sholl_Analysis

private void buildProfileFromIJ1Table() {
  final int lastRow = ij1table.getCounter() - 1;
  final int[] rowRange = getFilteredRowRange(lastRow);
  final double[] radii = ij1table.getColumnAsDoubles(radiiCol);
  final double[] counts = ij1table.getColumnAsDoubles(countsCol);
  for (int i = rowRange[0]; i <= rowRange[1]; i++) {
    final ProfileEntry entry = new ProfileEntry(radii[i], counts[i], null);
    profile.add(entry);
    if (!running)
      break;
  }
}

代码示例来源:origin: sc.fiji/mij

/**
 * Returns a specifying column the current instance of ResultsTable.
 *
 * @param heading    heading of a column
 * @return column specified by its heading
 */
public static Object getColumn(String heading){
  ResultsTable rt=Analyzer.getResultsTable();
  int col= rt.getColumnIndex(heading);
  int counter=rt.getCounter();
  double []results=new double[counter];
  results=rt.getColumnAsDoubles(col);
  return results;
}

代码示例来源:origin: ijpb/MorphoLibJ

private double[] getColumnValues(ResultsTable table, String heading)
{
  String[] allHeaders = table.getHeadings();
  // Check if column header corresponds to row label header
  boolean hasRowLabels = hasRowLabelColumn(table);
  if (hasRowLabels && heading.equals(allHeaders[0]))
  {
    // need to parse row label column
    int nr = table.size();
    double[] values = new double[nr];
    for (int r = 0; r < nr; r++)
    {
      String label = table.getLabel(r);
      values[r] = Double.parseDouble(label);
    }
    return values;
  }
  // determine index of column
  int index = table.getColumnIndex(heading);
  if (index == ResultsTable.COLUMN_NOT_FOUND)
  {
    throw new RuntimeException("Unable to find column index from header: " + heading);
  }
  return table.getColumnAsDoubles(index);
}

代码示例来源:origin: ijpb/MorphoLibJ

double[] geodDiamArray = table.getColumnAsDoubles(gdIndex);

代码示例来源:origin: ca.mcgill/Sholl_Analysis

radii = csvRT.getColumnAsDoubles(rColumn);
counts = csvRT.getColumnAsDoubles(cColumn);
if (radii == null || counts == null) {
  sError("Chosen columns are empty");

相关文章

微信公众号

最新文章

更多