Class: ResultsTable

ResultsTable

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.

Author:
  • Created by ijdoc2js

Members

(static, constant) ANGLE :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) AREA :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) AREA_FRACTION :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ASPECT_RATIO :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) AUTO_FORMAT :short

Type:
  • short
Author:
  • Created by ijdoc2js

(static, constant) CHANNEL :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) CIRCULARITY :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) COLUMN_IN_USE :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) COLUMN_NOT_FOUND :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) FERET :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) FERET_ANGLE :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) FERET_X :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) FERET_Y :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) FRAME :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) INTEGRATED_DENSITY :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) KURTOSIS :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) LAST_HEADING :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MAJOR :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MAX :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MAX_COLUMNS :int

Obsolete; use getLastColumn().

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MAX_THRESHOLD :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MEAN :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MEDIAN :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MIN :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MIN_FERET :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MIN_THRESHOLD :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MINOR :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) MODE :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) PERIMETER :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) RAW_INTEGRATED_DENSITY :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ROI_HEIGHT :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ROI_WIDTH :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ROI_X :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ROI_Y :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) ROUNDNESS :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) SKEWNESS :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) SLICE :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) SOLIDITY :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) STD_DEV :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) TABLE_FULL :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) X_CENTER_OF_MASS :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) X_CENTROID :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) Y_CENTER_OF_MASS :int

Type:
  • int
Author:
  • Created by ijdoc2js

(static, constant) Y_CENTROID :int

Type:
  • int
Author:
  • Created by ijdoc2js

Methods

addColumns()

Obsolete; the addValue() method automatically adds columns as needed.

Author:
  • Created by ijdoc2js

addLabel(label)

Adds a label to the beginning of the current row. Counter must be >0.

Parameters:
Name Type Description
label java.lang.String

-

Author:
  • Created by ijdoc2js

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)
Author:
  • Created by ijdoc2js

addResults()

Adds the last row in this table to the Results window without updating it.

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

clone()

Duplicates this ResultsTable.

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

boolean

columnExists(column)

Returns true if the specified column exists and is not empty.

Parameters:
Name Type Description
column int

-

Author:
  • Created by ijdoc2js
Returns:

boolean

createTableFromImage(ip)

Creates a ResultsTable from an image or image selection.

Parameters:
Name Type Description
ip ImageProcessor

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

java.lang.String

deleteRow(row)

Deletes the specified row.

Parameters:
Name Type Description
row int

-

Author:
  • Created by ijdoc2js

disableRowLabels()

Set the row label column to null if the column label is "Label".

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

double[]

getColumnHeading(column)

Returns the heading of the specified column or null if the column is empty.

Parameters:
Name Type Description
column int

-

Author:
  • Created by ijdoc2js
Returns:

java.lang.String

getColumnHeadings()

Returns a tab or comma delimited string containing the column headings.

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

int

getCounter()

Returns the current value of the measurement counter.

Author:
  • Created by ijdoc2js
Returns:

int

getDefaultHeading(index)

Parameters:
Name Type Description
index int

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

int

getHeadings()

Returns the column headings as an array of Strings.

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

java.lang.String

getLastColumn()

Returns the index of the last used column, or -1 if no columns are used.

Author:
  • Created by ijdoc2js
Returns:

int

getResultsTable()

Returns the ResultsTable used by the Measure command. This table must be displayed in the "Results" window.

Author:
  • Created by ijdoc2js
Returns:

ResultsTable

getResultsWindow()

Returns the "Results" TextWindow.

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

java.lang.String

getTableAsImage()

Returns the contents of this ResultsTable as a FloatProcessor.

Author:
  • Created by ijdoc2js
Returns:

ImageProcessor

getValue(column, row)

Deprecated. replaced by getValueAsDouble

Parameters:
Name Type Description
column int

-

row int

-

Deprecated:
  • replaced by getValueAsDouble
Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
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

-

Author:
  • Created by ijdoc2js
Returns:

double

incrementCounter()

Increments the measurement counter by one.

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js
Throws:
java.io.IOException
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

-

Author:
  • Created by ijdoc2js
Returns:

ResultsTable

reset()

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js
Returns:

boolean

saveAs(path)

Parameters:
Name Type Description
path java.lang.String

-

Author:
  • Created by ijdoc2js
Throws:
java.io.IOException

setDecimalPlaces(column, digits)

Parameters:
Name Type Description
column int

-

digits int

-

Author:
  • Created by ijdoc2js

setDefaultHeadings()

Sets the headings used by the Measure command ("Area", "Mean", etc.).

Author:
  • Created by ijdoc2js

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)
Author:
  • Created by ijdoc2js

setLabel(label, row)

Adds a label to the beginning of the specified row, or updates an existing lable, where 0<=rowshow() to update the window displaying the table.

Parameters:
Name Type Description
label java.lang.String

-

row int

-

Author:
  • Created by ijdoc2js

setNaNEmptyCells(NaNEmptyCells)

Set 'true' to initially fill data arrays with NaNs instead of zeros.

Parameters:
Name Type Description
NaNEmptyCells boolean

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

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

-

Author:
  • Created by ijdoc2js

showRowNumbers(showNumbers)

Parameters:
Name Type Description
showNumbers boolean

-

Author:
  • Created by ijdoc2js

size()

Returns the size of this ResultsTable.

Author:
  • Created by ijdoc2js
Returns:

int

toString()

Author:
  • Created by ijdoc2js
Returns:

java.lang.String

update(measurements, imp, roi)

Parameters:
Name Type Description
measurements int

-

imp ImagePlus

-

roi Roi

-

Author:
  • Created by ijdoc2js

updateResults()

Updates the Results window.

Author:
  • Created by ijdoc2js