|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectij.measure.ResultsTable
public class ResultsTable
This is a table for storing measurement results and strings as columns of values. Call the static ResultsTable.getResultsTable() method to get a reference to the ResultsTable used by the Analyze/Measure command.
Analyzer.getResultsTable()| Field Summary | |
|---|---|
static int |
ANGLE
|
static int |
AREA
|
static int |
AREA_FRACTION
|
static int |
ASPECT_RATIO
|
static short |
AUTO_FORMAT
|
static int |
CHANNEL
|
static int |
CIRCULARITY
|
static int |
COLUMN_IN_USE
|
static int |
COLUMN_NOT_FOUND
|
static int |
FERET
|
static int |
FERET_ANGLE
|
static int |
FERET_X
|
static int |
FERET_Y
|
static int |
FRAME
|
static int |
INTEGRATED_DENSITY
|
static int |
KURTOSIS
|
static int |
LAST_HEADING
|
static int |
MAJOR
|
static int |
MAX
|
static int |
MAX_COLUMNS
Obsolete; use getLastColumn(). |
static int |
MEAN
|
static int |
MEDIAN
|
static int |
MIN
|
static int |
MIN_FERET
|
static int |
MINOR
|
static int |
MODE
|
static int |
PERIMETER
|
static int |
RAW_INTEGRATED_DENSITY
|
static int |
ROI_HEIGHT
|
static int |
ROI_WIDTH
|
static int |
ROI_X
|
static int |
ROI_Y
|
static int |
ROUNDNESS
|
static int |
SKEWNESS
|
static int |
SLICE
|
static int |
SOLIDITY
|
static int |
STD_DEV
|
static int |
TABLE_FULL
|
static int |
X_CENTER_OF_MASS
|
static int |
X_CENTROID
|
static int |
Y_CENTER_OF_MASS
|
static int |
Y_CENTROID
|
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
addColumns()
Obsolete; the addValue() method automatically adds columns as needed. |
void |
addLabel(String label)
Adds a label to the beginning of the current row. |
void |
addLabel(String columnHeading,
String label)
Adds a label to the beginning of the current row. |
void |
addResults()
Adds the last row in this table to the Results window without updating it. |
void |
addValue(int column,
double value)
Adds a value to the end of the given column. |
void |
addValue(String column,
double value)
Adds a value to the end of the given column. |
void |
addValue(String column,
String value)
Adds a string value to the end of the given column. |
Object |
clone()
Duplicates this ResultsTable. |
boolean |
columnExists(int column)
Returns true if the specified column exists and is not empty. |
static ResultsTable |
createTableFromImage(ImageProcessor ip)
Creates a ResultsTable from an image or image selection. |
static String |
d2s(double n,
int decimalPlaces)
This is a version of IJ.d2s() that uses scientific notation for small numbes that would otherwise display as zero. |
void |
deleteRow(int row)
Deletes the specified row. |
void |
disableRowLabels()
Set the row label column to null if the column label is "Label". |
float[] |
getColumn(int column)
Returns a copy of the given column as a float array, or null if the column is empty. |
double[] |
getColumnAsDoubles(int column)
Returns a copy of the given column as a double array, or null if the column is empty. |
String |
getColumnHeading(int column)
Returns the heading of the specified column or null if the column is empty. |
String |
getColumnHeadings()
Returns a tab or comma delimited string containing the column headings. |
int |
getColumnIndex(String heading)
Returns the index of the first column with the given heading. |
int |
getCounter()
Returns the current value of the measurement counter. |
static String |
getDefaultHeading(int index)
|
int |
getFreeColumn(String heading)
Sets the heading of the the first available column and returns that column's index. |
String[] |
getHeadings()
Returns the column headings as an array of Strings. |
String |
getLabel(int row)
Returns the label of the specified row. |
int |
getLastColumn()
Returns the index of the last used column, or -1 if no columns are used. |
static ResultsTable |
getResultsTable()
Returns the ResultsTable used by the Measure command. |
static TextWindow |
getResultsWindow()
Returns the "Results" TextWindow. |
String |
getRowAsString(int row)
Returns a tab or comma delimited string representing the given row, where 0<=row<=counter-1. |
String |
getStringValue(int column,
int 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(). |
String |
getStringValue(String column,
int 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(). |
ImageProcessor |
getTableAsImage()
Returns the contents of this ResultsTable as a FloatProcessor. |
float |
getValue(int column,
int row)
Deprecated. replaced by getValueAsDouble |
double |
getValue(String column,
int 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(). |
double |
getValueAsDouble(int column,
int 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(). |
void |
incrementCounter()
Increments the measurement counter by one. |
static ResultsTable |
open(String path)
Opens a tab or comma delimited text file and returns it as a ResultsTable. |
static ResultsTable |
open2(String path)
Opens a tab or comma delimited text file and returns it as a ResultsTable, without requiring a try/catch statement. |
void |
reset()
|
boolean |
save(String path)
Saves this ResultsTable as a tab or comma delimited text file. |
void |
saveAs(String path)
|
void |
setDecimalPlaces(int column,
int digits)
|
void |
setDefaultHeadings()
Sets the headings used by the Measure command ("Area", "Mean", etc.). |
void |
setHeading(int column,
String heading)
Deprecated. replaced by addValue(String,double) and setValue(String,int,double) |
void |
setLabel(String label,
int row)
Adds a label to the beginning of the specified row, or updates an existing lable, where 0<=row |
void |
setPrecision(int precision)
Sets the decimal places (digits to the right of decimal point) that are used when this table is displayed. |
void |
setValue(int column,
int row,
double value)
Sets the value of the given column and row, where where 0<=column<=(lastRow+1 and 0<=row<=counter. |
void |
setValue(int column,
int row,
String value)
Sets the string value of the given column and row, where where 0<=column<=(lastRow+1 and 0<=row<=counter. |
void |
setValue(String column,
int row,
double value)
Sets the value of the given column and row, where where 0<=row<counter. |
void |
setValue(String column,
int row,
String value)
Sets the string value of the given column and row, where where 0<=row<counter. |
void |
show(String windowTitle)
Displays the contents of this ResultsTable in a window with the specified title, or updates an existing results window. |
void |
showRowNumbers(boolean showNumbers)
|
int |
size()
Returns the size of this ResultsTable. |
String |
toString()
|
void |
update(int measurements,
ImagePlus imp,
Roi roi)
|
void |
updateResults()
Updates the Results window. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_COLUMNS
public static final int COLUMN_NOT_FOUND
public static final int COLUMN_IN_USE
public static final int TABLE_FULL
public static final short AUTO_FORMAT
public static final int AREA
public static final int MEAN
public static final int STD_DEV
public static final int MODE
public static final int MIN
public static final int MAX
public static final int X_CENTROID
public static final int Y_CENTROID
public static final int X_CENTER_OF_MASS
public static final int Y_CENTER_OF_MASS
public static final int PERIMETER
public static final int ROI_X
public static final int ROI_Y
public static final int ROI_WIDTH
public static final int ROI_HEIGHT
public static final int MAJOR
public static final int MINOR
public static final int ANGLE
public static final int CIRCULARITY
public static final int FERET
public static final int INTEGRATED_DENSITY
public static final int MEDIAN
public static final int SKEWNESS
public static final int KURTOSIS
public static final int AREA_FRACTION
public static final int RAW_INTEGRATED_DENSITY
public static final int CHANNEL
public static final int SLICE
public static final int FRAME
public static final int FERET_X
public static final int FERET_Y
public static final int FERET_ANGLE
public static final int MIN_FERET
public static final int ASPECT_RATIO
public static final int ROUNDNESS
public static final int SOLIDITY
public static final int LAST_HEADING
| Constructor Detail |
|---|
public ResultsTable()
| Method Detail |
|---|
public static ResultsTable getResultsTable()
public static TextWindow getResultsWindow()
public void incrementCounter()
public void addColumns()
addValue(String, double)public int getCounter()
public int size()
public void addValue(int column,
double value)
public void addValue(String column,
double value)
public void addValue(String column,
String value)
public void addLabel(String label)
public void addLabel(String columnHeading,
String label)
public void setLabel(String label,
int row)
public void disableRowLabels()
public float[] getColumn(int column)
public double[] getColumnAsDoubles(int column)
public ImageProcessor getTableAsImage()
public static ResultsTable createTableFromImage(ImageProcessor ip)
public boolean columnExists(int column)
public int getColumnIndex(String heading)
public int getFreeColumn(String heading)
public double getValueAsDouble(int column,
int row)
public float getValue(int column,
int row)
public double getValue(String column,
int row)
public String getStringValue(String column,
int row)
public String getStringValue(int column,
int row)
public String getLabel(int row)
public void setValue(String column,
int row,
double value)
show() must be called to update the
window that displays the table.
public void setValue(int column,
int row,
double value)
public void setValue(String column,
int row,
String value)
show() must be called to update the
window that displays the table.
public void setValue(int column,
int row,
String value)
public String getColumnHeadings()
public String[] getHeadings()
public String getColumnHeading(int column)
public String getRowAsString(int row)
public void setHeading(int column,
String heading)
public void setDefaultHeadings()
public void setPrecision(int precision)
public void setDecimalPlaces(int column,
int digits)
public void showRowNumbers(boolean showNumbers)
public static String d2s(double n,
int decimalPlaces)
public void deleteRow(int row)
public void reset()
public int getLastColumn()
public void addResults()
public void updateResults()
public void show(String windowTitle)
public void update(int measurements,
ImagePlus imp,
Roi roi)
public static ResultsTable open2(String path)
public static ResultsTable open(String path)
throws IOException
IOExceptionopen2(String)public boolean save(String path)
public void saveAs(String path)
throws IOException
IOExceptionpublic static String getDefaultHeading(int index)
public Object clone()
clone in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||