NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #403 (closed task: fixed)

Opened 2011-03-29T15:31:14-05:00

Last modified 2011-04-29T10:39:15-05:00

Utilize the active Dataset in plugins

Reported by: bdezonia Owned by: bdezonia
Priority: minor Milestone: imagej-2.0-alpha2
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:


To avoid popping up a dialog everytime a plugin wants some kind of input we can use the currently active object.

Make ObjectManager track the currently active object for each type of object it tracks. The object can be an extra reference or just an index into the hoard.

Then extend Parameter to have another boolean option called useActive that defaults to false. If a plugin has useActive true then pass to its input(s) the active objects when possible.

A less important optimization would be if there was simply one object of a given type then regardless of the useActive flag value pass the one object to the plugin's input(s).

Change History

comment:1 Changed 2011-03-31T23:36:40-05:00 by curtis

  • Milestone changed from imagej-2.0-alpha1 to imagej-2.0-alpha2

comment:2 Changed 2011-04-04T14:29:33-05:00 by bdezonia

  • Priority changed from major to minor

comment:3 Changed 2011-04-29T10:39:15-05:00 by curtis

  • Status changed from new to closed
  • Resolution set to fixed

Added an ActiveDatasetPreprocessor in 96dbd1e5c27b634e5b2ed4cea8315a162cec75fb. This automatically assigns the active dataset to the sole Dataset parameter (if one exists) of a plugin. This solution is not general across all types of objects, but is certainly good enough for now.