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

Basic interaction methods for mitk::GeometryData. More...

#include <mitkBoundingShapeInteractor.h>

Inheritance diagram for mitk::BoundingShapeInteractor:
Collaboration diagram for mitk::BoundingShapeInteractor:

Public Member Functions

 mitkClassMacro (BoundingShapeInteractor, DataInteractor)
 
Pointer Clone () const
 
void SetDataNode (DataNode *dataNode) override
 
void SetRotationEnabled (bool rotationEnabled)
 
- Public Member Functions inherited from mitk::DataInteractor
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
DataNodeGetDataNode () const
 
int GetLayer () const
 
ProcessEventMode GetMode () const
 
- 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...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::DataInteractor
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

 BoundingShapeInteractor ()
 
 ~BoundingShapeInteractor () override
 
void ConnectActionsAndFunctions () override
 
void DataNodeChanged () override
 Called when a DataNode has been set/changed. More...
 
void HandlePositionChanged (const InteractionEvent *interactionEvent, Point3D &center)
 
virtual bool CheckOverObject (const InteractionEvent *)
 Checks if the mouse pointer is over the object. More...
 
virtual bool CheckOverHandles (const InteractionEvent *interactionEvent)
 Checks if the mouse pointer is over one of the assigned handles. More...
 
virtual void SelectObject (StateMachineAction *, InteractionEvent *)
 Called if the mouse pointer is over the object indicated by a color change. More...
 
virtual void DeselectObject (StateMachineAction *, InteractionEvent *)
 Called if the mouse pointer leaves the area of the object. More...
 
virtual void SelectHandle (StateMachineAction *, InteractionEvent *)
 Called if the mouse pointer is over one of the handles indicated by a color change. More...
 
virtual void TranslateObject (StateMachineAction *, InteractionEvent *)
 Performs a translation of the object relative to the mouse movement. More...
 
virtual void ScaleObject (StateMachineAction *, InteractionEvent *)
 Performs a object shape change by influencing the scaling of the initial bounding box. More...
 
virtual void InitInteraction (StateMachineAction *, InteractionEvent *interactionEvent)
 Initializes the movement, stores starting position. More...
 
virtual void DeselectHandles (StateMachineAction *, InteractionEvent *interactionEvent)
 Deselects all Handles at the end of interaction. More...
 
virtual void RestoreNodeProperties ()
 Restore default properties of bounding box and handles. More...
 
bool InitMembers (InteractionEvent *interactionEvent)
 Initializes member variables. More...
 
- Protected Member Functions inherited from mitk::DataInteractor
 DataInteractor ()
 
 ~DataInteractor () override
 
void ConnectActionsAndFunctions () override
 Overwrite this function to connect actions from StateMachine description with functions. More...
 
virtual void NotifyStart ()
 Sends StartInteraction event via the mitk::DataNode. More...
 
virtual void NotifyResultReady ()
 NotifyResultReady Sends ResultReady event via the mitk::DataNode. More...
 
- 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)
 
virtual bool FilterEvents (InteractionEvent *interactionEvent, DataNode *dataNode)
 
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)
 
virtual void ConfigurationChanged ()
 

Additional Inherited Members

- Public Types inherited from mitk::DataInteractor
typedef DataInteractor 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
 
- Static Public Attributes inherited from mitk::DataInteractor
static const std::string IntDeactivateMe
 
static const std::string IntLeaveWidget
 
static const std::string IntEnterWidget
 
- 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

Basic interaction methods for mitk::GeometryData.

Inherit from DataInteratcor, this provides functionality of a state machine and configurable inputs.

Definition at line 38 of file mitkBoundingShapeInteractor.h.

Constructor & Destructor Documentation

◆ BoundingShapeInteractor()

mitk::BoundingShapeInteractor::BoundingShapeInteractor ( )
protected

◆ ~BoundingShapeInteractor()

mitk::BoundingShapeInteractor::~BoundingShapeInteractor ( )
overrideprotected

Member Function Documentation

◆ CheckOverHandles()

virtual bool mitk::BoundingShapeInteractor::CheckOverHandles ( const InteractionEvent interactionEvent)
protectedvirtual

Checks if the mouse pointer is over one of the assigned handles.

◆ CheckOverObject()

virtual bool mitk::BoundingShapeInteractor::CheckOverObject ( const InteractionEvent )
protectedvirtual

Checks if the mouse pointer is over the object.

◆ Clone()

Pointer mitk::BoundingShapeInteractor::Clone ( ) const

◆ ConnectActionsAndFunctions()

void mitk::BoundingShapeInteractor::ConnectActionsAndFunctions ( )
overrideprotectedvirtual

Here actions strings from the loaded state machine pattern are mapped to functions of the DataInteractor. These functions are called when an action from the state machine pattern is executed.

Reimplemented from mitk::EventStateMachine.

◆ DataNodeChanged()

void mitk::BoundingShapeInteractor::DataNodeChanged ( )
overrideprotectedvirtual

Called when a DataNode has been set/changed.

Reimplemented from mitk::DataInteractor.

◆ DeselectHandles()

virtual void mitk::BoundingShapeInteractor::DeselectHandles ( StateMachineAction ,
InteractionEvent interactionEvent 
)
protectedvirtual

Deselects all Handles at the end of interaction.

◆ DeselectObject()

virtual void mitk::BoundingShapeInteractor::DeselectObject ( StateMachineAction ,
InteractionEvent  
)
protectedvirtual

Called if the mouse pointer leaves the area of the object.

◆ HandlePositionChanged()

void mitk::BoundingShapeInteractor::HandlePositionChanged ( const InteractionEvent interactionEvent,
Point3D center 
)
protected

◆ InitInteraction()

virtual void mitk::BoundingShapeInteractor::InitInteraction ( StateMachineAction ,
InteractionEvent interactionEvent 
)
protectedvirtual

Initializes the movement, stores starting position.

◆ InitMembers()

bool mitk::BoundingShapeInteractor::InitMembers ( InteractionEvent interactionEvent)
protected

Initializes member variables.

◆ mitkClassMacro()

mitk::BoundingShapeInteractor::mitkClassMacro ( BoundingShapeInteractor  ,
DataInteractor   
)

◆ New()

static Pointer mitk::BoundingShapeInteractor::New ( )
static

◆ RestoreNodeProperties()

virtual void mitk::BoundingShapeInteractor::RestoreNodeProperties ( )
protectedvirtual

Restore default properties of bounding box and handles.

◆ ScaleObject()

virtual void mitk::BoundingShapeInteractor::ScaleObject ( StateMachineAction ,
InteractionEvent  
)
protectedvirtual

Performs a object shape change by influencing the scaling of the initial bounding box.

◆ SelectHandle()

virtual void mitk::BoundingShapeInteractor::SelectHandle ( StateMachineAction ,
InteractionEvent  
)
protectedvirtual

Called if the mouse pointer is over one of the handles indicated by a color change.

◆ SelectObject()

virtual void mitk::BoundingShapeInteractor::SelectObject ( StateMachineAction ,
InteractionEvent  
)
protectedvirtual

Called if the mouse pointer is over the object indicated by a color change.

◆ SetDataNode()

void mitk::BoundingShapeInteractor::SetDataNode ( DataNode dataNode)
overridevirtual

Reimplemented from mitk::DataInteractor.

◆ SetRotationEnabled()

void mitk::BoundingShapeInteractor::SetRotationEnabled ( bool  rotationEnabled)

◆ TranslateObject()

virtual void mitk::BoundingShapeInteractor::TranslateObject ( StateMachineAction ,
InteractionEvent  
)
protectedvirtual

Performs a translation of the object relative to the mouse movement.


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