Skip to content

Shared table

Richard Domander edited this page Sep 11, 2018 · 3 revisions

The SharedTable is a singleton class that holds an instance of Table<DefaultColumn<Double>, Double>. BoneJ plug-ins can share this table by calling its public API. They can add data, and display their results by making the table their output. This is handy when you're interested in multiple measures for the same image.

The data in the Table is sorted according to the following rules:

  • Each row is marked with a header Label. The labels list the names of the images inserted to the table, e.g. bat-cochlea-volume.tif
  • Each column has a header, which tells you the type of the measurement, e.g. Volume
  • When data is added with label image.tif and header Volume
    • If there are no rows with label image.tif, add a new row
    • If there are rows with label image.tif, but not a column with header Volume, then add a column, and set the value of the cell on the last row that has the label (other rows in the column are left empty)
    • If there are rows with label image.tif, and a column with header Volume, then set the value of the cell on the last row that has the label if it's empty. Otherwise create a new row, and set the cell on that row.
  • Cells with no values are left empty (placeholder values such as 0 or NaN could be confused with actual results that are 0 or NaN)

The table can be cleared by calling the SharedTableCleaner plug-in at Plugins>BoneJ>Table>Clear BoneJ results.

Clone this wiki locally