|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Interface for observing all InteractionEvents dispatched through the system. More...
#include <mitkInteractionEventObserver.h>

Public Member Functions | |
| InteractionEventObserver () | |
| virtual | ~InteractionEventObserver () |
| virtual void | Notify (InteractionEvent *interactionEvent, bool isHandled)=0 |
| Called by the Dispatcher to notify this observer about an InteractionEvent. More... | |
| void | Disable () |
| Disable this observer so it no longer receives notifications. More... | |
| void | Enable () |
| Enable this observer so it receives notifications. More... | |
| bool | IsEnabled () const |
| Check whether this observer is currently enabled. More... | |
Interface for observing all InteractionEvents dispatched through the system.
Classes implementing this interface are notified about every InteractionEvent after it has been offered to all DataInteractors. Observers are registered as micro services and can optionally be scoped to a specific renderer.
This class also provides optional state machine infrastructure. See the Notify() method documentation for details on how to use it with or without a state machine.
Definition at line 41 of file mitkInteractionEventObserver.h.
| mitk::InteractionEventObserver::InteractionEventObserver | ( | ) |
|
virtual |
| void mitk::InteractionEventObserver::Disable | ( | ) |
Disable this observer so it no longer receives notifications.
| void mitk::InteractionEventObserver::Enable | ( | ) |
Enable this observer so it receives notifications.
| bool mitk::InteractionEventObserver::IsEnabled | ( | ) | const |
Check whether this observer is currently enabled.
|
pure virtual |
Called by the Dispatcher to notify this observer about an InteractionEvent.
All registered InteractionEventObservers receive every event after it has been offered to DataInteractors. The isHandled flag indicates whether a DataInteractor has already handled the event. Observers that trigger actions should consider this flag to avoid confusing the user with multiple independent actions from one event.
To use state machine infrastructure, forward the event to HandleEvent():
| [in] | interactionEvent | The event being dispatched. |
| [in] | isHandled | True if a DataInteractor already handled this event. |
Implemented in mitk::EventRecorder, mitk::Tool, mitk::DisplayActionEventBroadcast, and mitk::nnInteractiveTool.