Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::DisplayActionEventBroadcast Class Reference

This class serves as an event state machine while simultaneously observing interaction events. It connects the actions from the event state machine .xml-file with concrete functions of this class. More...

#include <mitkDisplayActionEventBroadcast.h>

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

Public Types

typedef DisplayActionEventBroadcast Self
 
typedef EventStateMachine Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::EventStateMachine
typedef EventStateMachine Self
 
typedef InteractionEventHandler Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef std::map< std::string, TActionFunctor * > ActionFunctionsMapType
 
typedef itk::SmartPointer< StateMachineStateStateMachineStateType
 
- Public Types inherited from mitk::InteractionEventHandler
typedef InteractionEventHandler Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
void Notify (InteractionEvent *interactionEvent, bool isHandled) override
 
- Public Member Functions inherited from mitk::EventStateMachine
bool LoadStateMachine (const std::string &filename, const us::Module *module=nullptr)
 Loads XML resource. More...
 
bool HandleEvent (InteractionEvent *event, DataNode *dataNode)
 
void EnableUndo (bool enable)
 Enables or disabled Undo. More...
 
void EnableInteraction (bool enable)
 Enables/disables the state machine. In un-enabled state it won't react to any events. More...
 
- Public Member Functions inherited from mitk::InteractionEventHandler
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 ()
 
void Enable ()
 
bool IsEnabled () const
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::EventStateMachine
static const char * GetStaticNameOfClass ()
 
- Static Public Member Functions inherited from mitk::InteractionEventHandler
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 DisplayActionEventBroadcast ()
 
 ~DisplayActionEventBroadcast () override
 
void ConnectActionsAndFunctions () override
 Connects the action names used in the state machine pattern with functions implemented within this InteractionEventObserver. More...
 
void ConfigurationChanged () override
 This function is executed when a config object is set / changed (via 'SetEventConfig' or 'AddEventConfig' in 'InteractionEventObserver'). It is used to read out the parameters set in the configuration file and to set the member variables accordingly. More...
 
bool FilterEvents (InteractionEvent *interactionEvent, DataNode *dataNode) override
 Filters the event resp. the sender of the event. More...
 
bool CheckPositionEvent (const InteractionEvent *interactionEvent)
 Check if the given interaction event is actually an 'InteractionPositionEvent'. More...
 
bool CheckRotationPossible (const InteractionEvent *interactionEvent)
 
bool CheckSwivelPossible (const InteractionEvent *interactionEvent)
 
void Init (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void Move (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void SetCrosshair (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void Zoom (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void Scroll (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void ScrollOneUp (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void ScrollOneDown (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void AdjustLevelWindow (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void StartRotation (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void EndRotation (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void Rotate (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void Swivel (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void IncreaseTimeStep (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
void DecreaseTimeStep (StateMachineAction *stateMachineAction, InteractionEvent *interactionEvent)
 
- Protected Member Functions inherited from mitk::EventStateMachine
 EventStateMachine ()
 
 ~EventStateMachine () override
 
void AddActionFunction (const std::string &action, TActionFunctor *functor)
 
void AddActionFunction (const std::string &action, const ActionFunctionDelegate &delegate)
 
void AddConditionFunction (const std::string &condition, const ConditionFunctionDelegate &delegate)
 
StateMachineStateGetCurrentState () 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...
 
StateMachineTransitionGetExecutableTransition (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

- 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
 
UndoControllerm_UndoController
 
bool m_UndoEnabled
 

Detailed Description

This class serves as an event state machine while simultaneously observing interaction events. It 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 are defined and connected inside this broadcast class. They typically contain some preprocessing steps and use the results of the preprocessing to broadcast a specific display event.

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

Definition at line 32 of file mitkDisplayActionEventBroadcast.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Constructor & Destructor Documentation

◆ DisplayActionEventBroadcast()

mitk::DisplayActionEventBroadcast::DisplayActionEventBroadcast ( )
protected

◆ ~DisplayActionEventBroadcast()

mitk::DisplayActionEventBroadcast::~DisplayActionEventBroadcast ( )
overrideprotected

Member Function Documentation

◆ AdjustLevelWindow()

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

◆ CheckPositionEvent()

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

Check if the given interaction event is actually an 'InteractionPositionEvent'.

interactionEvent The interaction event that is checked.
Returns
True, if the given event can be dynamically cast to an 'InteractionPositionEvent'. False, if not.

◆ CheckRotationPossible()

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

◆ CheckSwivelPossible()

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

◆ Clone()

Pointer mitk::DisplayActionEventBroadcast::Clone ( ) const

◆ ConfigurationChanged()

void mitk::DisplayActionEventBroadcast::ConfigurationChanged ( )
overrideprotectedvirtual

This function is executed when a config object is set / changed (via 'SetEventConfig' or 'AddEventConfig' in 'InteractionEventObserver'). It is used to read out the parameters set in the configuration file and to set the member variables accordingly.

Reimplemented from mitk::InteractionEventHandler.

◆ ConnectActionsAndFunctions()

void mitk::DisplayActionEventBroadcast::ConnectActionsAndFunctions ( )
overrideprotectedvirtual

Connects the action names used in the state machine pattern with functions implemented within this InteractionEventObserver.

Reimplemented from mitk::EventStateMachine.

◆ DecreaseTimeStep()

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

◆ EndRotation()

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

◆ FilterEvents()

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

Filters the event resp. the sender of the event.

interactionEvent The event whose sender has to be checked
data node The data node is ignored in this specific implementation.
Returns
True, if the sender of the event is a valid sender and the sending renderer is a 2D-renderer. False, if not.

Reimplemented from mitk::EventStateMachine.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::DisplayActionEventBroadcast::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::EventStateMachine.

Definition at line 35 of file mitkDisplayActionEventBroadcast.h.

◆ GetClassName()

virtual const char* mitk::DisplayActionEventBroadcast::GetClassName ( ) const
virtual

Reimplemented from mitk::EventStateMachine.

◆ GetStaticNameOfClass()

static const char* mitk::DisplayActionEventBroadcast::GetStaticNameOfClass ( )
inlinestatic

Definition at line 35 of file mitkDisplayActionEventBroadcast.h.

◆ IncreaseTimeStep()

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

◆ Init()

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

◆ Move()

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

◆ New()

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

◆ Notify()

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

By this function this observer is notified about about every 'InteractionEvent'. The interaction event is passed to the state machine in order to use its infrastructure. For more information see

See also
InteractionEventObserver.
interactionEvent The event that was observed and triggered this notification.
isHandled Flag that indicates if a 'DataInteractor' has already handled the event.

Implements mitk::InteractionEventObserver.

◆ Rotate()

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

◆ Scroll()

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

◆ ScrollOneDown()

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

◆ ScrollOneUp()

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

◆ SetCrosshair()

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

◆ StartRotation()

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

◆ Swivel()

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

◆ Zoom()

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

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