Events should allow to accept a lambda function, that is processed with the event.
Those events should minimize the necessary checks inside the lambda function (filter sender, etc.).
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Open | None | T29393 [mxn multi widget] Concept for individual render window synchronization | ||
Open | None | T24216 Synchronization of individual render windows: camera position | ||
Resolved | kalali | T24275 Define events for sychronized display interaction |
Event Timeline
The task description is not valid anymore. A command-approach is used to connect std::functions that should be executed on a specific event.
The events are used to define on which invoked event the command should be used (execute its std::functions).
DisplayActionEvents are a subclass of itk::AnyEvent. They are further subclassed to provide methods for getting and setting event-specific properties (e.g. zoom factor).
The events are invoked by the DisplayActionEventBroadcast-class to inform the observer about a certain event.
The DisplayActionEventHandler-class can be used to set a command as an observer of a display action event. Such a command can contain a filter function and an action function which is used to check a condition and execute an action if the event was received.
The implementation is contained in T23760-Custom-multi-widget-editor (see mitkDisplayActionEvents.h; see mitkDisplayActionEventBroadcast.cpp and mitkDisplayActionEventFunctions.cpp for usage).