Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
ResultsTable Class Reference

Public Member Functions

 ResultsTable ()
 
synchronized void incrementCounter ()
 
int getCounter ()
 
void addValue (int column, double value)
 
void addValue (String column, double value)
 
void addLabel (String columnHeading, String label)
 
void disableRowLabels ()
 
float[] getColumn (int column)
 
boolean columnExists (int column)
 
int getColumnIndex (String heading)
 
int getFreeColumn (String heading)
 
float getValue (int column, int row)
 
double getValue (String column, int row)
 
void setValue (String column, int row, double value)
 
void setValue (int column, int row, double value)
 
String getColumnHeadings ()
 
String getColumnHeading (int column)
 
String getRowAsString (int row)
 
void setHeading (int column, String heading)
 
void setPrecision (int precision)
 
synchronized void reset ()
 
void show (String windowTitle)
 
String toString ()
 

Static Public Member Functions

static ResultsTable getResultsTable ()
 

Static Public Attributes

static final int MAX_COLUMNS = 50
 
static final int COLUMN_NOT_FOUND = -1
 
static final int COLUMN_IN_USE = -2
 
static final int TABLE_FULL = -3
 
static final int AREA =0
 

Detailed Description

This is a table for storing measurement results as columns of real numbers. Call Analyzer.getResultsTable() to get a reference to the ResultsTable used by the Analyze/Measure command.

See Also
ij.plugin.filter.Analyzer::getResultsTable

Definition at line 12 of file ResultsTable.java.

Constructor & Destructor Documentation

ResultsTable ( )
inline

Constructs an empty ResultsTable with the counter=0 and no columns.

Definition at line 39 of file ResultsTable.java.

Member Function Documentation

void addLabel ( String  columnHeading,
String  label 
)
inline

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

Definition at line 103 of file ResultsTable.java.

void addValue ( int  column,
double  value 
)
inline

Adds a value to the end of the given column. Counter must be >0.

Definition at line 76 of file ResultsTable.java.

void addValue ( String  column,
double  value 
)
inline

Adds a value to the end of the given column. If the column does not exist, it is created. Counter must be >0.

Definition at line 92 of file ResultsTable.java.

boolean columnExists ( int  column)
inline

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

Definition at line 134 of file ResultsTable.java.

void disableRowLabels ( )
inline

Set the row label column to null.

Definition at line 114 of file ResultsTable.java.

float [] getColumn ( int  column)
inline

Returns a copy of the given column as a float array. Returns null if the column is empty.

Definition at line 120 of file ResultsTable.java.

String getColumnHeading ( int  column)
inline

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

Definition at line 245 of file ResultsTable.java.

String getColumnHeadings ( )
inline

Returns a tab-delimited string containing the column headings.

Definition at line 228 of file ResultsTable.java.

int getColumnIndex ( String  heading)
inline

Returns the index of the first column with the given heading. heading. If not found, returns COLUMN_NOT_FOUND.

Definition at line 143 of file ResultsTable.java.

int getCounter ( )
inline

Returns the current value of the measurement counter.

Definition at line 71 of file ResultsTable.java.

int getFreeColumn ( String  heading)
inline

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. Returns TABLE_FULL if there are no free columns.

Definition at line 157 of file ResultsTable.java.

static ResultsTable getResultsTable ( )
inlinestatic

Returns the ResultsTable used by the Measure command.

Definition at line 45 of file ResultsTable.java.

String getRowAsString ( int  row)
inline

Returns a tab-delimited string representing the given row, where 0<=row<=counter-1.

Definition at line 253 of file ResultsTable.java.

float getValue ( int  column,
int  row 
)
inline

Returns the value of the given column and row, where column must be greater than or equal zero and less than MAX_COLUMNS and row must be greater than or equal zero and less than counter.

Definition at line 175 of file ResultsTable.java.

double getValue ( String  column,
int  row 
)
inline

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 getCounter(). Throws an IllegalArgumentException if this ResultsTable does not have a column with the specified heading.

Definition at line 188 of file ResultsTable.java.

synchronized void incrementCounter ( )
inline

Increments the measurement counter by one.

Definition at line 51 of file ResultsTable.java.

synchronized void reset ( )
inline

Clears all the columns and sets the counter to zero.

Definition at line 296 of file ResultsTable.java.

void setHeading ( int  column,
String  heading 
)
inline

Changes the heading of the given column.

Definition at line 275 of file ResultsTable.java.

void setPrecision ( int  precision)
inline

Sets the number of digits to the right of decimal point.

Definition at line 282 of file ResultsTable.java.

void setValue ( String  column,
int  row,
double  value 
)
inline

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.

Definition at line 203 of file ResultsTable.java.

void setValue ( int  column,
int  row,
double  value 
)
inline

Sets the value of the given column and row, where where 0<=column<MAX_COLUMNS and 0<=row<counter.

Definition at line 215 of file ResultsTable.java.

void show ( String  windowTitle)
inline

Displays the contents of this ResultsTable in a window with the specified title. Opens a new window if there is no open text window with this title.

Definition at line 311 of file ResultsTable.java.


The documentation for this class was generated from the following file: