Skip to content

ResultsInserter

Richard Domander edited this page Apr 20, 2016 · 3 revisions

ResultsInserter is an intermediary class used by BoneJ plugins to display numerical data. It's purpose is to free the plugins from considering the details of how to results are actually displayed. By default it uses the default ResultsTable instance from ImageJ1, but with a custom policy:

  1. Insert a value, to column with the given heading onto a row with the given label:
  2. If there are no rows with the given label, then add a new row.
  3. If there are rows with the given label, but there is not a column with the given heading, then add a column, and set its value on the first row with the label.
  4. If there are rows with the given label and there's a column with the given heading, then find the first row which has no value in the column (== Double.NaN), and add the new value there. If there are no such rows, then add a new row.

ResultsInserter class

  • The ResultsInserter must be independent of OS and GUI library.
  • If ResultsInserter is called while ImageJ is running in "headless" (no GUI), then the results must be written into CSV text file. The file must be human readable.

BoneJ1 source


Future

  • Migrate ResultsInserter to use whatever replaces ResultsTable in ImageJ2
Clone this wiki locally