Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::DisplayActionEventBroadcast Class Reference

Event state machine that observes interaction events and broadcasts display action events. More...

#include <mitkDisplayActionEventBroadcast.h>

Inheritance diagram for mitk::DisplayActionEventBroadcast:
Collaboration diagram for mitk::DisplayActionEventBroadcast:

Public Member Functions

 mitkClassMacro (DisplayActionEventBroadcast, EventStateMachine)
 
Pointer Clone () const
 
void Notify (InteractionEvent *interactionEvent, bool isHandled) override
 Called for every InteractionEvent observed through the InteractionEventObserver interface. More...
 
- Public Member Functions inherited from mitk::EventStateMachine
 mitkClassMacro (EventStateMachine, InteractionEventHandler)
 
bool LoadStateMachine (const std::string &filename, const us::Module *module=nullptr)
 Load a state machine pattern from an XML resource file. More...
 
bool HandleEvent (InteractionEvent *event, DataNode *dataNode)
 Process an incoming interaction event. More...
 
void EnableUndo (bool enable)
 Enable or disable the undo mechanism for this state machine. More...
 
void EnableInteraction (bool enable)
 Enable or disable the state machine. More...
 
- Public Member Functions inherited from mitk::InteractionEventHandler
 mitkClassMacroItkParent (InteractionEventHandler, itk::Object)
 
bool SetEventConfig (const std::string &filename, const us::Module *module=nullptr)
 Loads a configuration from an XML resource. More...
 
bool SetEventConfig (const EventConfig &config)
 Loads a configuration from an EventConfig object. More...
 
EventConfig GetEventConfig () const
 Returns the current configuration. More...
 
bool AddEventConfig (const std::string &filename, const us::Module *module=nullptr)
 This method extends the configuration. More...
 
bool AddEventConfig (const EventConfig &config)
 This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined. More...
 
- Public Member Functions inherited from mitk::InteractionEventObserver
 InteractionEventObserver ()
 
virtual ~InteractionEventObserver ()
 
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...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 DisplayActionEventBroadcast ()
 Constructor. Connects actions and registers as a MicroService. More...
 
 ~DisplayActionEventBroadcast () override
 Destructor. Unregisters the MicroService. More...
 
void ConnectActionsAndFunctions () override
 Connect the action names from the state machine XML with member functions. More...
 
void ConfigurationChanged () override
 Called when the event configuration is set or changed. More...
 
bool FilterEvents (InteractionEvent *interactionEvent, DataNode *dataNode) override
 Filter events by checking the sender renderer. More...
 
bool CheckPositionEvent (const InteractionEvent *interactionEvent)
 Check if the given event is an InteractionPositionEvent. More...
 
bool CheckRotationPossible (const InteractionEvent *interactionEvent)
 Check if rotation is possible given the current interaction state. More...
 
bool CheckSwivelPossible (const InteractionEvent *interactionEvent)
 Check if swivel is possible given the current interaction state. More...
 
void Init (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Initialize interaction coordinates at the start of a gesture. More...
 
void Move (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplayMoveEvent based on mouse movement. More...
 
void SetCrosshair (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplaySetCrosshairEvent at the current position. More...
 
void Zoom (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplayZoomEvent based on mouse movement. More...
 
void Scroll (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplayScrollEvent based on mouse movement. More...
 
void ScrollOneUp (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplayScrollEvent to scroll one slice up. More...
 
void ScrollOneDown (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplayScrollEvent to scroll one slice down. More...
 
void AdjustLevelWindow (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Broadcast a DisplaySetLevelWindowEvent based on mouse movement. More...
 
void StartRotation (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Begin a plane rotation interaction. More...
 
void EndRotation (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 End a plane rotation interaction. More...
 
void Rotate (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Perform a plane rotation based on mouse movement. More...
 
void Swivel (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Perform a plane swivel based on mouse movement. More...
 
void IncreaseTimeStep (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Increase the current time step by one. More...
 
void DecreaseTimeStep (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 Decrease the current time step by one. More...
 
- Protected Member Functions inherited from mitk::EventStateMachine
 EventStateMachine ()
 
 ~EventStateMachine () override
 
void AddActionFunction (const std::string &action, const ActionFunctionDelegate &delegate)
 
void AddConditionFunction (const std::string &condition, const ConditionFunctionDelegate &delegate)
 
StateMachineState * GetCurrentState () const
 
void ResetToStartState ()
 ResetToStartState Reset state machine to it initial starting state. More...
 
virtual bool CheckCondition (const StateMachineCondition &condition, const InteractionEvent *interactionEvent)
 
virtual void ExecuteAction (StateMachineAction *action, InteractionEvent *interactionEvent)
 
void SetMouseCursor (const char *xpm[], int hotspotX, int hotspotY)
 Sets the specified mouse cursor. More...
 
void ResetMouseCursor ()
 Resets the mouse cursor to its original state. More...
 
StateMachineTransition * GetExecutableTransition (InteractionEvent *event)
 Returns the executable transition for the given event. More...
 
- Protected Member Functions inherited from mitk::InteractionEventHandler
 InteractionEventHandler ()
 
 ~InteractionEventHandler () override
 
PropertyList::Pointer GetAttributes () const
 
std::string MapToEventVariant (InteractionEvent *interactionEvent)
 

Additional Inherited Members

- Public Types inherited from mitk::EventStateMachine
typedef itk::SmartPointer< StateMachineState > StateMachineStateType
 
- Protected Types inherited from mitk::EventStateMachine
typedef MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > ActionFunctionDelegate
 
typedef MessageAbstractDelegate1< const InteractionEvent *, bool > ConditionFunctionDelegate
 
- Protected Attributes inherited from mitk::EventStateMachine
bool m_IsActive
 
UndoController * m_UndoController
 
bool m_UndoEnabled
 

Detailed Description

Event state machine that observes interaction events and broadcasts display action events.

Connects the actions from the event state machine XML file with concrete functions of this class. The observed interaction events are mouse events that trigger certain actions according to an event configuration (e.g. PACS mode). These actions typically perform preprocessing and then broadcast a specific display action event (e.g. DisplayMoveEvent, DisplayZoomEvent).

Any instance that wants to react to the invoked events can call AddObserver() on a specific broadcast instance, providing an itkEventObject and an itkCommand.

See also
DisplayActionEventHandler DisplayActionEvents InteractionEventObserver

Definition at line 37 of file mitkDisplayActionEventBroadcast.h.

Constructor & Destructor Documentation

◆ DisplayActionEventBroadcast()

mitk::DisplayActionEventBroadcast::DisplayActionEventBroadcast ( )
protected

Constructor. Connects actions and registers as a MicroService.

◆ ~DisplayActionEventBroadcast()

mitk::DisplayActionEventBroadcast::~DisplayActionEventBroadcast ( )
overrideprotected

Destructor. Unregisters the MicroService.

Member Function Documentation

◆ AdjustLevelWindow()

void mitk::DisplayActionEventBroadcast::AdjustLevelWindow ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplaySetLevelWindowEvent based on mouse movement.

◆ CheckPositionEvent()

bool mitk::DisplayActionEventBroadcast::CheckPositionEvent ( const InteractionEvent *  interactionEvent)
protected

Check if the given event is an InteractionPositionEvent.

Parameters
interactionEventThe event to check.
Returns
true if the event can be cast to InteractionPositionEvent.

◆ CheckRotationPossible()

bool mitk::DisplayActionEventBroadcast::CheckRotationPossible ( const InteractionEvent *  interactionEvent)
protected

Check if rotation is possible given the current interaction state.

Parameters
interactionEventThe current interaction event.
Returns
true if rotation can be performed.

◆ CheckSwivelPossible()

bool mitk::DisplayActionEventBroadcast::CheckSwivelPossible ( const InteractionEvent *  interactionEvent)
protected

Check if swivel is possible given the current interaction state.

Parameters
interactionEventThe current interaction event.
Returns
true if swivel can be performed.

◆ Clone()

Pointer mitk::DisplayActionEventBroadcast::Clone ( ) const

◆ ConfigurationChanged()

void mitk::DisplayActionEventBroadcast::ConfigurationChanged ( )
overrideprotectedvirtual

Called when the event configuration is set or changed.

Reads parameters from the configuration file and updates member variables accordingly (scroll direction, zoom factor, etc.).

Reimplemented from mitk::InteractionEventHandler.

◆ ConnectActionsAndFunctions()

void mitk::DisplayActionEventBroadcast::ConnectActionsAndFunctions ( )
overrideprotectedvirtual

Connect the action names from the state machine XML with member functions.

Reimplemented from mitk::EventStateMachine.

◆ DecreaseTimeStep()

void mitk::DisplayActionEventBroadcast::DecreaseTimeStep ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Decrease the current time step by one.

◆ EndRotation()

void mitk::DisplayActionEventBroadcast::EndRotation ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

End a plane rotation interaction.

◆ FilterEvents()

bool mitk::DisplayActionEventBroadcast::FilterEvents ( InteractionEvent *  interactionEvent,
DataNode *  dataNode 
)
overrideprotectedvirtual

Filter events by checking the sender renderer.

Parameters
interactionEventThe event whose sender is checked.
dataNodeIgnored in this implementation.
Returns
true if the sender is valid and uses a 2D renderer, false otherwise.

Reimplemented from mitk::EventStateMachine.

◆ IncreaseTimeStep()

void mitk::DisplayActionEventBroadcast::IncreaseTimeStep ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Increase the current time step by one.

◆ Init()

void mitk::DisplayActionEventBroadcast::Init ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Initialize interaction coordinates at the start of a gesture.

◆ mitkClassMacro()

mitk::DisplayActionEventBroadcast::mitkClassMacro ( DisplayActionEventBroadcast  ,
EventStateMachine   
)

◆ Move()

void mitk::DisplayActionEventBroadcast::Move ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplayMoveEvent based on mouse movement.

◆ New()

static Pointer mitk::DisplayActionEventBroadcast::New ( )
static

◆ Notify()

void mitk::DisplayActionEventBroadcast::Notify ( InteractionEvent *  interactionEvent,
bool  isHandled 
)
overridevirtual

Called for every InteractionEvent observed through the InteractionEventObserver interface.

The interaction event is passed to the state machine in order to use its infrastructure for action dispatch.

Parameters
interactionEventThe event that was observed and triggered this notification.
isHandledFlag indicating whether a DataInteractor has already handled the event.
See also
InteractionEventObserver

Implements mitk::InteractionEventObserver.

◆ Rotate()

void mitk::DisplayActionEventBroadcast::Rotate ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Perform a plane rotation based on mouse movement.

◆ Scroll()

void mitk::DisplayActionEventBroadcast::Scroll ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplayScrollEvent based on mouse movement.

◆ ScrollOneDown()

void mitk::DisplayActionEventBroadcast::ScrollOneDown ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplayScrollEvent to scroll one slice down.

◆ ScrollOneUp()

void mitk::DisplayActionEventBroadcast::ScrollOneUp ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplayScrollEvent to scroll one slice up.

◆ SetCrosshair()

void mitk::DisplayActionEventBroadcast::SetCrosshair ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplaySetCrosshairEvent at the current position.

◆ StartRotation()

void mitk::DisplayActionEventBroadcast::StartRotation ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Begin a plane rotation interaction.

◆ Swivel()

void mitk::DisplayActionEventBroadcast::Swivel ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Perform a plane swivel based on mouse movement.

◆ Zoom()

void mitk::DisplayActionEventBroadcast::Zoom ( StateMachineAction *  stateMachineAction,
InteractionEvent *  interactionEvent 
)
protected

Broadcast a DisplayZoomEvent based on mouse movement.


The documentation for this class was generated from the following file: