Ticket #403 (closed task: fixed)

Opened 9 years ago

Last modified 9 years ago

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 9 years ago by curtis

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

comment:2 Changed 9 years ago by bdezonia

  • Priority changed from major to minor

comment:3 Changed 9 years ago 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.

Note: See TracTickets for help on using tickets.