[ImageJ-devel] Tables / TableDisplays / ResultsTables as input parameters

Lee Kamentsky leek at broadinstitute.org
Fri Jul 19 09:11:34 CDT 2013


Hi all,
I have a command plugin that needs a table as an input parameter. There are
plugins in the code base that take tables as output parameters (e.g.
imagej.core.commands.display.ShowLUTAsTable), but I can't find an example
of one as an input parameter. A ResultsTable is used as an output parameter
in ShowLUTAsTable; an alternate choice might be to use a TableDisplay
instead. Commands use ImageDisplay as an input - it would seem symmetrical
to use TableDisplay for tables. I've tried using TableDisplay as an input
and it works adequately, but I'd like to conform to the standard and avoid
creating two ways of asking for table inputs and outputs.

The problem with using ResultsTable as an input is that it's not registered
in the ObjectService. I think the situation is simpler than for Data
objects which have reference counts. The controlled type of a Display<T> is
wholly owned by the display, so no reference count is needed and the Table
can be added and removed from the ObjectService as it's added or removed
from the Display via ObjectCreated and ObjectDeleted events. Perhaps this
could be done in AbstractDisplay and be similarly applied to views? I guess
you could sign me up for the work since I'll end up using and testing it.

Alternatively, I am fine with using TableDisplay as input and ResultsTable
as output, although future developers might suffer from the ambiguous
nature of TableDisplay - which of the tables should be used for an
operation if there are more than one? I think using TableDisplay as input
and output is the best choice if ResultsTables aren't added to the
ObjectService and existing plugins with ResultsTable outputs should be
modified to output TableDisplay instead so that all ImageJ object parameter
inputs and outputs can be fetched using the ObjectService.

--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20130719/2a00f1b2/attachment.html>


More information about the ImageJ-devel mailing list