What do you mean by “works”? The following Groovy script:
#@ net.imagej.table.ResultsTable rt
println rt
results in the message “A ResultsTable required but none exist.” for me, which is expected because the ObjectService
doesn’t know any object of this class.
For IJ1 ResultsTable
s, there’s currently only a SingleInputPreprocessor
, namely ResultsTablePreprocessor
in imagej-legacy
.
This means that the parameters is filled with the currently active ResultsTable
(the one named “Results”), as ImageJ 1.x traditionally only knows one results table.
If you want to be able to choose between several open results tables:
- something in ImageJ (probably in addition to the window manager) needs to be aware of all currently open results tables, e.g. the
ObjectService
, or
- a dedicated
ResultsTableInputWidget implements InputWidget<ResultsTable>
would have to be created (only necessary if you want something else than the default choice widget created for objects known to ObjectService
.
If you think something like this would be useful, I’d vote to keep track of org.scijava.table.Table
objects and offer a widget for them, but leave the current behavior of ij.measure.ResultsTable
unchanged.