Table Functions
These functions, added in ImageJ 1.52a, work with tables. They operate on the current (frontmost) table or, with most of the functions, an optional title argument can be provided (must be last argument). Examples: Sine/Cosine Tables, Rearrange Table and Access Tables.

Table.create(name) - Creates or resets a table. If the table exists, it is reset (cleared), otherwise a new table with the specified name is opened.
Table.reset(name) - Resets the specified table.
Table.size - The number of rows in the current table.
Table.title - The title (name) of the current table.
Table.headings - The column headings as a tab-delimited string.
Table.get(columnName, rowIndex) - Returns the numeric value from the cell at the specified column and row.
Table.getString(columnName, rowIndex) - Returns a string value from the cell at the specified column and row.
Table.set(columnName, rowIndex, value) - Assigns a numeric or string value to the cell at the specified column and row.
Table.getColumn(columnName) - Returns the specified column as an array.
Table.setColumn(columnName, array) - Assigns an array to the specified column.
Table.renameColumn(oldName, newName) - Renames a column.
Table.deleteColumn(columnName) - Deletes the specified column.
Table.update - Updates the window displaying the current table.
Table.rename(oldName, newName) - Renames a table.
Table.save(filePath) - Saves a table.
Table.open(filePath) - Opens a table.
Table.deleteRows(firstIndex, lastIndex) - Deletes specified rows.
Table.showRowNumbers(boolean) - Enable/disable row numbers. Default is 'false'.
Table.showArrays(titleAndOptions, array1, array2, ...) - Displays arrays in a table (same as Array.show).
Table.applyMacro(code) - Applies macro code to each row of the table. Columns are assigned variable names as given by Table.headings. New variables starting with an uppercase letter create a new column with this name. The variable 'row' (row index) is pre-defined. Currently only supports numeric values except for row labels.
Home