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

Data interactor for mouse-based registration manipulation in 2D render windows. More...

#include <mitkRegistrationManipulationInteractor.h>

Inheritance diagram for mitk::RegistrationManipulationInteractor:
Collaboration diagram for mitk::RegistrationManipulationInteractor:

Classes

struct  RotationDelta
 

Public Member Functions

 mitkClassMacro (RegistrationManipulationInteractor, DataInteractor)
 
Pointer Clone () const
 
void SetCenterOfRotation (const Point3D &center)
 
const Vector3D & GetTranslationDelta () const
 
const RotationDelta & GetRotationDelta () const
 
const Point3D & GetSelectPosition () const
 
void DisableOriginalInteraction ()
 
void EnableOriginalInteraction ()
 
void PushManipulationCursor ()
 
void PopManipulationCursor ()
 
- Public Member Functions inherited from mitk::DataInteractor
 mitkClassMacro (DataInteractor, EventStateMachine)
 
Pointer Clone () const
 
DataNode * GetDataNode () const
 Get the DataNode associated with this interactor. More...
 
virtual void SetDataNode (DataNode *dataNode)
 Set the DataNode that this interactor operates on. 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 ()
 

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 Member Functions inherited from mitk::DataInteractor
 DataInteractor ()
 
 ~DataInteractor () override
 
virtual void DataNodeChanged ()
 Is called when a DataNode is initially set or changed To be implemented by sub-classes for initialization code which require a DataNode. 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, 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 ()
 
- Protected Attributes inherited from mitk::EventStateMachine
bool m_IsActive
 
UndoController * m_UndoController
 
bool m_UndoEnabled
 

Detailed Description

Data interactor for mouse-based registration manipulation in 2D render windows.

The interactor supports in-plane translation and in-plane rotation (around the view plane normal) via modifier+mouse-drag combinations, plus a plain click for navigator position selection:

  • Shift + Left-drag: In-plane translation
  • Ctrl + Left-drag: In-plane rotation around the center of rotation
  • Plain Left-click: Selects the clicked world position as navigator position

While a modifier is held without a pressed mouse button, the interactor foreshadows the upcoming gesture by switching the cursor.

The interactor computes transform deltas and notifies observers via ITK events:

  • RegistrationTranslationEvent
  • RegistrationRotationEvent
  • RegistrationSelectPositionEvent

It does NOT modify any data directly; the receiving widget/plugin is responsible for reading the corresponding delta/position via the matching getter and applying it to the registration transform.

Precondition
The center of rotation must be set before rotation interactions.
The interactor should be registered on a DataNode that is visible in the 2D render windows where interaction is desired.

Definition at line 66 of file mitkRegistrationManipulationInteractor.h.

Member Function Documentation

◆ Clone()

Pointer mitk::RegistrationManipulationInteractor::Clone ( ) const

◆ DisableOriginalInteraction()

void mitk::RegistrationManipulationInteractor::DisableOriginalInteraction ( )

Disable the default display interactions (pan, zoom, etc.) to avoid conflicts with this interactor's modifier+mouse-drag combinations. Saves the current DisplayActionEventBroadcast configs for later restoration. Safe to call multiple times; double-disabling is a no-op.

See also
EnableOriginalInteraction

◆ EnableOriginalInteraction()

void mitk::RegistrationManipulationInteractor::EnableOriginalInteraction ( )

Restore the display interactions that were saved by DisableOriginalInteraction().

See also
DisableOriginalInteraction

◆ GetRotationDelta()

const RotationDelta& mitk::RegistrationManipulationInteractor::GetRotationDelta ( ) const
Returns
The last computed rotation delta. Valid after RegistrationRotationEvent.

◆ GetSelectPosition()

const Point3D& mitk::RegistrationManipulationInteractor::GetSelectPosition ( ) const
Returns
The world position where the user clicked for position selection. Valid after RegistrationSelectPositionEvent.

◆ GetTranslationDelta()

const Vector3D& mitk::RegistrationManipulationInteractor::GetTranslationDelta ( ) const
Returns
The last computed translation delta. Valid after RegistrationTranslationEvent.

◆ mitkClassMacro()

mitk::RegistrationManipulationInteractor::mitkClassMacro ( RegistrationManipulationInteractor  ,
DataInteractor   
)

◆ New()

static Pointer mitk::RegistrationManipulationInteractor::New ( )
static

◆ PopManipulationCursor()

void mitk::RegistrationManipulationInteractor::PopManipulationCursor ( )

Pop the base manipulation cursor from the application cursor stack. Call this when the interaction tool is deactivated.

See also
PushManipulationCursor

References mitk::None.

◆ PushManipulationCursor()

void mitk::RegistrationManipulationInteractor::PushManipulationCursor ( )

Push the base manipulation cursor onto the application cursor stack. Call this when the interaction tool is activated.

See also
PopManipulationCursor

◆ SetCenterOfRotation()

void mitk::RegistrationManipulationInteractor::SetCenterOfRotation ( const Point3D &  center)

Set the center of rotation in world coordinates. Used for rotation angle computation.


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