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

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

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

ResultsTable.getFreeColumn介绍

[英]Sets the heading of the the first available column and returns that column's index. Returns COLUMN_IN_USE if this is a duplicate heading.
[中]设置第一个可用列的标题并返回该列的索引。如果是重复标题,则返回使用中的列。

代码示例

代码示例来源:origin: net.imagej/ij

int getColumnID(String name) {
  int id = rt.getFreeColumn(name);
  if (id==ResultsTable.COLUMN_IN_USE)
    id = rt.getColumnIndex(name);
  return id;
}

代码示例来源:origin: imagej/ImageJA

int getColumnID(String name) {
  int id = rt.getFreeColumn(name);
  if (id==ResultsTable.COLUMN_IN_USE)
    id = rt.getColumnIndex(name);
  return id;
}

代码示例来源:origin: net.imagej/ij

/** Sets the string value of the given column and row, where
  where 0<=row<size(). If the specified column does 
  not exist, it is created. When adding columns, 
  <code>show()</code> must be called to update the 
  window that displays the table.*/
public void setValue(String column, int row, String value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int col = getColumnIndex(column);
  if (col==COLUMN_NOT_FOUND)
    col = getFreeColumn(column);
  setValue(col, row, value);
}

代码示例来源:origin: net.imagej/ij

/** Adds a value to the end of the given column. If the column
  does not exist, it is created.
  There is an example at:<br>
  http://imagej.nih.gov/ij/plugins/sine-cosine.html
*/
public void addValue(String column, double value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int index = getColumnIndex(column);
  if (index==COLUMN_NOT_FOUND)
    index = getFreeColumn(column);
  addValue(index, value);
  keep[index] = true;
}

代码示例来源:origin: net.imagej/ij

/** Sets the value of the given column and row, where
  where 0&lt;=row&lt;size(). If the specified column does 
  not exist, it is created. When adding columns, 
  <code>show()</code> must be called to update the 
  window that displays the table.*/
public void setValue(String column, int row, double value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int col = getColumnIndex(column);
  if (col==COLUMN_NOT_FOUND)
    col = getFreeColumn(column);
  setValue(col, row, value);
}

代码示例来源:origin: imagej/ImageJA

/** Adds a value to the end of the given column. If the column
  does not exist, it is created.
  There is an example at:<br>
  http://imagej.nih.gov/ij/plugins/sine-cosine.html
*/
public void addValue(String column, double value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int index = getColumnIndex(column);
  if (index==COLUMN_NOT_FOUND)
    index = getFreeColumn(column);
  addValue(index, value);
  keep[index] = true;
}

代码示例来源:origin: net.imagej/imagej-legacy

@Override
public int getFreeColumn(final String heading) {
  final int newColumn = super.getFreeColumn(heading);
  createMissingColumns(newColumn);
  if (newColumn >= 0) source.setColumnHeader(newColumn, heading);
  return newColumn;
}

代码示例来源:origin: imagej/ImageJA

/** Sets the value of the given column and row, where
  where 0&lt;=row&lt;size(). If the specified column does 
  not exist, it is created. When adding columns, 
  <code>show()</code> must be called to update the 
  window that displays the table.*/
public void setValue(String column, int row, double value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int col = getColumnIndex(column);
  if (col==COLUMN_NOT_FOUND)
    col = getFreeColumn(column);
  setValue(col, row, value);
}

代码示例来源:origin: imagej/ImageJA

/** Sets the string value of the given column and row, where
  where 0&lt;=row&lt;size(). If the specified column does 
  not exist, it is created. When adding columns, 
  <code>show()</code> must be called to update the 
  window that displays the table.*/
public void setValue(String column, int row, String value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int col = getColumnIndex(column);
  if (col==COLUMN_NOT_FOUND)
    col = getFreeColumn(column);
  setValue(col, row, value);
}

代码示例来源:origin: net.imagej/ij

/** Adds a string value to the end of the given column. If the column
  does not exist, it is created. */
public void addValue(String column, String value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int index = getColumnIndex(column);
  if (index==COLUMN_NOT_FOUND)
    index = getFreeColumn(column);
  addValue(index, Double.NaN);
  setValue(column, size()-1, value);
  keep[index] = true;
}

代码示例来源:origin: imagej/ImageJA

/** Adds a string value to the end of the given column. If the column
  does not exist, it is created. */
public void addValue(String column, String value) {
  if (column==null)
    throw new IllegalArgumentException("Column is null");
  int index = getColumnIndex(column);
  if (index==COLUMN_NOT_FOUND)
    index = getFreeColumn(column);
  addValue(index, Double.NaN);
  setValue(column, size()-1, value);
  keep[index] = true;
}

代码示例来源:origin: imagej/ImageJA

columnInUse[columnNumber] = macro.indexOf(variable) >=0;
else if (Character.isUpperCase(variable.charAt(0))) {
  getFreeColumn(variable);            // create new column
  newColumnList.add(variable);

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

/**
 * Set a specifying column into the current instance ResultsTable.
 *
 * @param heading    heading of a column    
 * @param object
 */
public static void setColumn(String heading, Object object){
  ResultsTable rt=Analyzer.getResultsTable();
  int col= rt.getColumnIndex(heading);
  if (col==ResultsTable.COLUMN_NOT_FOUND) 
    col=rt.getFreeColumn(heading);
  int cc=rt.getCounter();
  if (object instanceof double[]) {
    double[] values = (double[]) object;
    for (int i=0; i<values.length; i++){
      if (cc<=i) rt.incrementCounter();
      rt.setValue(col, i, values[i]);
    }
  }
}

代码示例来源:origin: net.imagej/ij

columnInUse[columnNumber] = macro.indexOf(variable) >=0;
else if (Character.isUpperCase(variable.charAt(0))) {
  getFreeColumn(variable);            // create new column
  newColumnList.add(variable);

代码示例来源:origin: net.imagej/ij

int col = getColumnIndex(column);
if (col==COLUMN_NOT_FOUND)
  col = getFreeColumn(column);
for (int i=0; i<array.length; i++) {
  if (array[i].getString()!=null)

代码示例来源:origin: imagej/ImageJA

int col = getColumnIndex(column);
if (col==COLUMN_NOT_FOUND)
  col = getFreeColumn(column);
for (int i=0; i<array.length; i++) {
  if (array[i].getString()!=null)

代码示例来源:origin: net.imagej/imagej-legacy

int colIndex = ij1Table.getColumnIndex(header);
if (colIndex < 0) {
  int newCol = ij1Table.getFreeColumn(header);

相关文章

微信公众号

最新文章

更多