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: |
|
Component: | Core | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
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: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.