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

Affine interaction with mitk::BaseGeometry. More...

#include <mitkAffineBaseDataInteractor3D.h>

Inheritance diagram for mitk::AffineBaseDataInteractor3D:
Collaboration diagram for mitk::AffineBaseDataInteractor3D:

Public Member Functions

 mitkClassMacro (AffineBaseDataInteractor3D, DataInteractor)
 
Pointer Clone () const
 
void SetDataNode (DataNode *node) override
 Set the DataNode for this interactor. More...
 
void TranslateGeometry (mitk::Vector3D translate, mitk::BaseGeometry *geometry)
 Translate the given geometry by the specified vector. More...
 
void RotateGeometry (mitk::ScalarType angle, int rotationaxis, mitk::BaseGeometry *geometry)
 Rotate the given geometry around one of its principal axes. More...
 
void ScaleGeometry (mitk::Point3D newScale, mitk::BaseGeometry *geometry)
 Scale the given geometry by the specified factors. More...
 
mitk::BaseGeometry * GetUpdatedTimeGeometry (mitk::InteractionEvent *interactionEvent)
 Retrieve the geometry for the current time step from the interaction event. More...
 
- Public Member Functions inherited from mitk::DataInteractor
 mitkClassMacro (DataInteractor, EventStateMachine)
 
Pointer Clone () const
 
DataNode * GetDataNode () const
 Get the DataNode associated with this interactor. More...
 
int GetLayer () const
 Get the rendering layer of the associated DataNode. More...
 
ProcessEventMode GetMode () const
 Get the current event processing mode from the state machine's current state. 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...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::DataInteractor
static Pointer New ()
 

Protected Member Functions

 AffineBaseDataInteractor3D ()
 
 ~AffineBaseDataInteractor3D () override
 
void ConnectActionsAndFunctions () override
 
void DataNodeChanged () override
 
virtual bool CheckOverObject (const InteractionEvent *)
 
virtual void SelectObject (StateMachineAction *, InteractionEvent *)
 
virtual void DeselectObject (StateMachineAction *, InteractionEvent *)
 
virtual void InitTranslate (StateMachineAction *, InteractionEvent *)
 
virtual void InitRotate (StateMachineAction *, InteractionEvent *)
 
virtual void TranslateObject (StateMachineAction *, InteractionEvent *)
 
virtual void RotateObject (StateMachineAction *, InteractionEvent *)
 
virtual void ScaleObject (StateMachineAction *, InteractionEvent *)
 
virtual void TranslateUpKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void TranslateDownKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void TranslateLeftKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void TranslateRightKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void TranslateUpModifierKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void TranslateDownModifierKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateUpKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateDownKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateLeftKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateRightKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateUpModifierKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void RotateDownModifierKey (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void ScaleDownKey (mitk::StateMachineAction *, mitk::InteractionEvent *interactionEvent)
 
virtual void ScaleUpKey (mitk::StateMachineAction *, mitk::InteractionEvent *interactionEvent)
 
virtual void RestoreNodeProperties ()
 
bool InitMembers (InteractionEvent *interactionEvent)
 InitMembers convenience method to avoid code duplication between InitRotate() and InitTranslate(). More...
 
- Protected Member Functions inherited from mitk::DataInteractor
 DataInteractor ()
 
 ~DataInteractor () override
 
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, 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)
 
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...
 
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)
 
virtual void ConfigurationChanged ()
 

Additional Inherited Members

- Public Types inherited from mitk::EventStateMachine
typedef itk::SmartPointer< StateMachineState > StateMachineStateType
 
- Static Public Attributes inherited from mitk::DataInteractor
static const std::string IntDeactivateMe
 Internal signal name to request deactivation of this interactor. More...
 
static const std::string IntLeaveWidget
 Internal signal name indicating the pointer left the widget area. More...
 
static const std::string IntEnterWidget
 Internal signal name indicating the pointer entered the widget area. More...
 
- 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

Affine interaction with mitk::BaseGeometry.

Provides translation, rotation, and scaling of data objects in 3D render windows via mouse and keyboard interaction. The interactor is driven by a state machine pattern and supports configurable step sizes through DataNode properties.

Relevant DataNode properties:

  • "AffineBaseDataInteractor3D.Translation Step Size" (float, default 1.0)
  • "AffineBaseDataInteractor3D.Rotation Step Size" (float, default 1.0)
  • "AffineBaseDataInteractor3D.Scale Step Size" (float, default 0.1)
  • "AffineBaseDataInteractor3D.Anchor Point X/Y/Z" (float, default 0.0)
See also
DataInteractor, AffineImageCropperInteractor

Definition at line 54 of file mitkAffineBaseDataInteractor3D.h.

Constructor & Destructor Documentation

◆ AffineBaseDataInteractor3D()

mitk::AffineBaseDataInteractor3D::AffineBaseDataInteractor3D ( )
protected

◆ ~AffineBaseDataInteractor3D()

mitk::AffineBaseDataInteractor3D::~AffineBaseDataInteractor3D ( )
overrideprotected

Member Function Documentation

◆ CheckOverObject()

virtual bool mitk::AffineBaseDataInteractor3D::CheckOverObject ( const InteractionEvent *  )
protectedvirtual

Initializes the movement, stores starting position.

◆ Clone()

Pointer mitk::AffineBaseDataInteractor3D::Clone ( ) const

◆ ConnectActionsAndFunctions()

void mitk::AffineBaseDataInteractor3D::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::DataInteractor.

◆ DataNodeChanged()

void mitk::AffineBaseDataInteractor3D::DataNodeChanged ( )
overrideprotectedvirtual

This function is called when a DataNode has been set/changed.

Reimplemented from mitk::DataInteractor.

◆ DeselectObject()

virtual void mitk::AffineBaseDataInteractor3D::DeselectObject ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ GetUpdatedTimeGeometry()

mitk::BaseGeometry* mitk::AffineBaseDataInteractor3D::GetUpdatedTimeGeometry ( mitk::InteractionEvent *  interactionEvent)

Retrieve the geometry for the current time step from the interaction event.

Parameters
[in]interactionEventThe event providing time step information.
Returns
Pointer to the geometry for the relevant time step, or nullptr if the geometry could not be obtained.

◆ InitMembers()

bool mitk::AffineBaseDataInteractor3D::InitMembers ( InteractionEvent *  interactionEvent)
protected

InitMembers convenience method to avoid code duplication between InitRotate() and InitTranslate().

Parameters
interactionEvent

◆ InitRotate()

virtual void mitk::AffineBaseDataInteractor3D::InitRotate ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ InitTranslate()

virtual void mitk::AffineBaseDataInteractor3D::InitTranslate ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ mitkClassMacro()

mitk::AffineBaseDataInteractor3D::mitkClassMacro ( AffineBaseDataInteractor3D  ,
DataInteractor   
)

◆ New()

static Pointer mitk::AffineBaseDataInteractor3D::New ( )
static

◆ RestoreNodeProperties()

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

◆ RotateDownKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateDownKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ RotateDownModifierKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateDownModifierKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ RotateGeometry()

void mitk::AffineBaseDataInteractor3D::RotateGeometry ( mitk::ScalarType  angle,
int  rotationaxis,
mitk::BaseGeometry *  geometry 
)

Rotate the given geometry around one of its principal axes.

The rotation is performed around an anchor point defined by DataNode properties.

Parameters
[in]angleThe rotation angle in degrees.
[in]rotationaxisThe axis index to rotate around (0=x, 1=y, 2=z).
[in,out]geometryThe geometry to rotate.

◆ RotateLeftKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateLeftKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ RotateObject()

virtual void mitk::AffineBaseDataInteractor3D::RotateObject ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ RotateRightKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateRightKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ RotateUpKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateUpKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ RotateUpModifierKey()

virtual void mitk::AffineBaseDataInteractor3D::RotateUpModifierKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ ScaleDownKey()

virtual void mitk::AffineBaseDataInteractor3D::ScaleDownKey ( mitk::StateMachineAction *  ,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ ScaleGeometry()

void mitk::AffineBaseDataInteractor3D::ScaleGeometry ( mitk::Point3D  newScale,
mitk::BaseGeometry *  geometry 
)

Scale the given geometry by the specified factors.

Scaling is performed relative to an anchor point defined by DataNode properties.

Parameters
[in]newScaleThe scale factors for each axis.
[in,out]geometryThe geometry to scale.

◆ ScaleObject()

virtual void mitk::AffineBaseDataInteractor3D::ScaleObject ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ ScaleUpKey()

virtual void mitk::AffineBaseDataInteractor3D::ScaleUpKey ( mitk::StateMachineAction *  ,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ SelectObject()

virtual void mitk::AffineBaseDataInteractor3D::SelectObject ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ SetDataNode()

void mitk::AffineBaseDataInteractor3D::SetDataNode ( DataNode *  node)
overridevirtual

Set the DataNode for this interactor.

Restores the color of any previously assigned node before setting the new one.

Parameters
[in]nodeThe DataNode to interact with.

Reimplemented from mitk::DataInteractor.

◆ TranslateDownKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateDownKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ TranslateDownModifierKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateDownModifierKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ TranslateGeometry()

void mitk::AffineBaseDataInteractor3D::TranslateGeometry ( mitk::Vector3D  translate,
mitk::BaseGeometry *  geometry 
)

Translate the given geometry by the specified vector.

Triggers a rendering update after translation.

Parameters
[in]translateThe translation vector in world coordinates.
[in,out]geometryThe geometry to translate.

◆ TranslateLeftKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateLeftKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ TranslateObject()

virtual void mitk::AffineBaseDataInteractor3D::TranslateObject ( StateMachineAction *  ,
InteractionEvent *   
)
protectedvirtual

◆ TranslateRightKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateRightKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ TranslateUpKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateUpKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

◆ TranslateUpModifierKey()

virtual void mitk::AffineBaseDataInteractor3D::TranslateUpModifierKey ( StateMachineAction *  ,
InteractionEvent *  interactionEvent 
)
protectedvirtual

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