new ResultsTable()
Constructs an empty ResultsTable with the counter=0, no columns and the precision set to 3 or the "Decimal places" value in Analyze/Set Measurements if that value is higher than 3.
Members
(static, constant) ANGLE :int
Type:
- int
(static, constant) AREA :int
Type:
- int
(static, constant) AREA_FRACTION :int
Type:
- int
(static, constant) ASPECT_RATIO :int
Type:
- int
(static, constant) AUTO_FORMAT :short
Type:
- short
(static, constant) CHANNEL :int
Type:
- int
(static, constant) CIRCULARITY :int
Type:
- int
(static, constant) COLUMN_IN_USE :int
Type:
- int
(static, constant) COLUMN_NOT_FOUND :int
Type:
- int
(static, constant) FERET :int
Type:
- int
(static, constant) FERET_ANGLE :int
Type:
- int
(static, constant) FERET_X :int
Type:
- int
(static, constant) FERET_Y :int
Type:
- int
(static, constant) FRAME :int
Type:
- int
(static, constant) INTEGRATED_DENSITY :int
Type:
- int
(static, constant) KURTOSIS :int
Type:
- int
(static, constant) LAST_HEADING :int
Type:
- int
(static, constant) MAJOR :int
Type:
- int
(static, constant) MAX :int
Type:
- int
(static, constant) MAX_COLUMNS :int
Obsolete; use getLastColumn().
Type:
- int
(static, constant) MAX_THRESHOLD :int
Type:
- int
(static, constant) MEAN :int
Type:
- int
(static, constant) MEDIAN :int
Type:
- int
(static, constant) MIN :int
Type:
- int
(static, constant) MIN_FERET :int
Type:
- int
(static, constant) MIN_THRESHOLD :int
Type:
- int
(static, constant) MINOR :int
Type:
- int
(static, constant) MODE :int
Type:
- int
(static, constant) PERIMETER :int
Type:
- int
(static, constant) RAW_INTEGRATED_DENSITY :int
Type:
- int
(static, constant) ROI_HEIGHT :int
Type:
- int
(static, constant) ROI_WIDTH :int
Type:
- int
(static, constant) ROI_X :int
Type:
- int
(static, constant) ROI_Y :int
Type:
- int
(static, constant) ROUNDNESS :int
Type:
- int
(static, constant) SKEWNESS :int
Type:
- int
(static, constant) SLICE :int
Type:
- int
(static, constant) SOLIDITY :int
Type:
- int
(static, constant) STD_DEV :int
Type:
- int
(static, constant) TABLE_FULL :int
Type:
- int
(static, constant) X_CENTER_OF_MASS :int
Type:
- int
(static, constant) X_CENTROID :int
Type:
- int
(static, constant) Y_CENTER_OF_MASS :int
Type:
- int
(static, constant) Y_CENTROID :int
Type:
- int
Methods
addColumns()
Obsolete; the addValue() method automatically adds columns as needed.
addLabel(label)
Adds a label to the beginning of the current row. Counter must be >0.
Parameters:
Name | Type | Description |
---|---|---|
label |
java.lang.String | - |
addLabel(columnHeading, label)
Deprecated. Replaced by setValue(String,int,String)
Parameters:
Name | Type | Description |
---|---|---|
columnHeading |
java.lang.String | - |
label |
java.lang.String | - |
- Deprecated:
- . Replaced by setValue(String,int,String)
addResults()
Adds the last row in this table to the Results window without updating it.
addValue(column, value)
Adds a value to the end of the given column. Counter must be >0.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
value |
double | - |
addValue(column, value)
Adds a value to the end of the given column. If the column
does not exist, it is created. Counter must be >0.
There is an example at:
http://imagej.nih.gov/ij/plugins/sine-cosine.html
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
value |
double | - |
addValue(column, value)
Adds a string value to the end of the given column. If the column does not exist, it is created. Counter must be >0.
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
value |
java.lang.String | - |
clone()
Duplicates this ResultsTable.
Returns:
java.lang.Object
columnExists(column)
Returns 'true' if the specified column exists and is not emptly.
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
Returns:
boolean
columnExists(column)
Returns true if the specified column exists and is not empty.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
Returns:
boolean
createTableFromImage(ip)
Creates a ResultsTable from an image or image selection.
Parameters:
Name | Type | Description |
---|---|---|
ip |
ImageProcessor | - |
Returns:
ResultsTable
d2s(n, decimalPlaces)
This is a version of IJ.d2s() that uses scientific notation for small numbes that would otherwise display as zero.
Parameters:
Name | Type | Description |
---|---|---|
n |
double | - |
decimalPlaces |
int | - |
Returns:
java.lang.String
deleteRow(row)
Deletes the specified row.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | - |
disableRowLabels()
Set the row label column to null if the column label is "Label".
getColumn(column)
Returns a copy of the given column as a float array, or null if the column is empty.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
Returns:
float[]
getColumnAsDoubles(column)
Returns a copy of the given column as a double array, or null if the column is empty.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
Returns:
double[]
getColumnHeading(column)
Returns the heading of the specified column or null if the column is empty.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
Returns:
java.lang.String
getColumnHeadings()
Returns a tab or comma delimited string containing the column headings.
Returns:
java.lang.String
getColumnIndex(heading)
Returns the index of the first column with the given heading. heading. If not found, returns COLUMN_NOT_FOUND.
Parameters:
Name | Type | Description |
---|---|---|
heading |
java.lang.String | - |
Returns:
int
getCounter()
Returns the current value of the measurement counter.
Returns:
int
getDefaultHeading(index)
Parameters:
Name | Type | Description |
---|---|---|
index |
int | - |
Returns:
java.lang.String
getFreeColumn(heading)
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.
Parameters:
Name | Type | Description |
---|---|---|
heading |
java.lang.String | - |
Returns:
int
getHeadings()
Returns the column headings as an array of Strings.
Returns:
java.lang.String[]
getLabel(row)
Returns the label of the specified row. Returns null if the row does not have a label.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | - |
Returns:
java.lang.String
getLastColumn()
Returns the index of the last used column, or -1 if no columns are used.
Returns:
int
getResultsTable()
Returns the ResultsTable used by the Measure command. This table must be displayed in the "Results" window.
Returns:
ResultsTable
getResultsWindow()
Returns the "Results" TextWindow.
Returns:
TextWindow
getRowAsString(row)
Returns a tab or comma delimited string representing the given row, where 0<=row<=counter-1.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | - |
Returns:
java.lang.String
getStringValue(column, row)
Returns the string value of the given column and row, where row must be greater than or equal zero and less than the value returned by size().
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
row |
int | - |
Returns:
java.lang.String
getStringValue(column, row)
Returns the string value of the given column and row, where column must be less than or equal the value returned by getLastColumn() and row must be greater than or equal zero and less than the value returned by size().
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
row |
int | - |
Returns:
java.lang.String
getTableAsImage()
Returns the contents of this ResultsTable as a FloatProcessor.
Returns:
ImageProcessor
getValue(column, row)
Deprecated. replaced by getValueAsDouble
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
row |
int | - |
- Deprecated:
- . replaced by getValueAsDouble
Returns:
float
getValue(column, row)
Returns the value of the specified column and row, where column is the column heading and row is a number greater than or equal zero and less than value returned by size(). Throws an IllegalArgumentException if this ResultsTable does not have a column with the specified heading.
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
row |
int | - |
Returns:
double
getValueAsDouble(column, row)
Returns the value of the given column and row, where column must be less than or equal the value returned by getLastColumn() and row must be greater than or equal zero and less than the value returned by size().
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
row |
int | - |
Returns:
double
incrementCounter()
Increments the measurement counter by one.
open(path)
Opens a tab or comma delimited text file and returns it as a ResultsTable. Displays a file open dialog if 'path' is empty or null.
Parameters:
Name | Type | Description |
---|---|---|
path |
java.lang.String | - |
Throws:
Returns:
ResultsTable
open2(path)
Opens a tab or comma delimited text file and returns it as a ResultsTable, without requiring a try/catch statement. Displays a file open dialog if 'path' is empty or null.
Parameters:
Name | Type | Description |
---|---|---|
path |
java.lang.String | - |
Returns:
ResultsTable
reset()
save(path)
Saves this ResultsTable as a tab or comma delimited text file. The table is saved as a CSV (comma-separated values) file if 'path' ends with ".csv". Displays a file save dialog if 'path' is empty or null. Does nothing if the table is empty. Displays an error message and returns 'false' if there is an error.
Parameters:
Name | Type | Description |
---|---|---|
path |
java.lang.String | - |
Returns:
boolean
saveAs(path)
Parameters:
Name | Type | Description |
---|---|---|
path |
java.lang.String | - |
Throws:
setDecimalPlaces(column, digits)
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
digits |
int | - |
setDefaultHeadings()
Sets the headings used by the Measure command ("Area", "Mean", etc.).
setHeading(column, heading)
Deprecated. Replaced by addValue(String,double) and setValue(String,int,double)
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
heading |
java.lang.String | - |
- Deprecated:
- . Replaced by addValue(String,double) and setValue(String,int,double)
setLabel(label, row)
Adds a label to the beginning of the specified row,
or updates an existing lable, where 0<=row
Parameters:
Name | Type | Description |
---|---|---|
label |
java.lang.String | - |
row |
int | - |
setNaNEmptyCells(NaNEmptyCells)
Set 'true' to initially fill data arrays with NaNs instead of zeros.
Parameters:
Name | Type | Description |
---|---|---|
NaNEmptyCells |
boolean | - |
setPrecision(precision)
Sets the decimal places (digits to the right of decimal point) that are used when this table is displayed.
Parameters:
Name | Type | Description |
---|---|---|
precision |
int | - |
setValue(column, row, value)
Sets the value of the given column and row, where
where 0<=row<counter. If the specified column does
not exist, it is created. When adding columns,
show()
must be called to update the
window that displays the table.
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
row |
int | - |
value |
double | - |
setValue(column, row, value)
Sets the string value of the given column and row, where where 0<=column<=(lastRow+1 and 0<=row<=counter.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
row |
int | - |
value |
java.lang.String | - |
setValue(column, row, value)
Sets the value of the given column and row, where where 0<=column<=(lastRow+1 and 0<=row<=counter.
Parameters:
Name | Type | Description |
---|---|---|
column |
int | - |
row |
int | - |
value |
double | - |
setValue(column, row, value)
Sets the string value of the given column and row, where
where 0<=row<counter. If the specified column does
not exist, it is created. When adding columns,
show()
must be called to update the
window that displays the table.
Parameters:
Name | Type | Description |
---|---|---|
column |
java.lang.String | - |
row |
int | - |
value |
java.lang.String | - |
show(windowTitle)
Displays the contents of this ResultsTable in a window with the specified title, or updates an existing results window. Opens a new window if there is no open text window with this title. The title must be "Results" if this table was obtained using ResultsTable.getResultsTable() or Analyzer.getResultsTable .
Parameters:
Name | Type | Description |
---|---|---|
windowTitle |
java.lang.String | - |
showRowNumbers(showNumbers)
Parameters:
Name | Type | Description |
---|---|---|
showNumbers |
boolean | - |
size()
Returns the size of this ResultsTable.
Returns:
int
toString()
Returns:
java.lang.String
update(measurements, imp, roi)
Parameters:
Name | Type | Description |
---|---|---|
measurements |
int | - |
imp |
ImagePlus | - |
roi |
Roi | - |
updateResults()
Updates the Results window.