Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkRegistrationManipulationWidget Class Reference

Widget for interactively manipulating a 3D rigid registration (rotation and translation). More...

#include <QmitkRegistrationManipulationWidget.h>

Inheritance diagram for QmitkRegistrationManipulationWidget:
Collaboration diagram for QmitkRegistrationManipulationWidget:

Public Types

typedef map::core::Registration< 3, 3 > MAPRegistrationType
 Type alias for a 3D-to-3D MatchPoint registration. More...
 

Public Slots

void SetCenterOfRotation (const mitk::Point3D &center)
 Sets the center of rotation for the Euler transform. More...
 
void SetCenterOfRotationIsRelativeToTarget (bool targetRelative)
 Controls whether the center of rotation is specified relative to the target space. More...
 

Signals

void RegistrationChanged (map::core::RegistrationBase *registration)
 Emitted whenever the registration transform is updated. More...
 

Public Member Functions

 QmitkRegistrationManipulationWidget (QWidget *parent=nullptr)
 Constructs the registration manipulation widget. More...
 
 ~QmitkRegistrationManipulationWidget () override
 Destructor. More...
 
void Initialize ()
 Initializes the widget with an identity transform. More...
 
void Initialize (MAPRegistrationType *precedingRegistration)
 Initializes the widget with a preceding (baseline) registration. More...
 
void Initialize (const mitk::Point3D &movingReference, const mitk::Point3D &targetReference)
 Initializes the widget with a translation derived from two reference points. More...
 
map::core::RegistrationBase * GetInterimRegistration () const
 Returns the current interim registration reflecting the widget's transform state. More...
 
map::core::RegistrationBase::Pointer GenerateRegistration () const
 Generates a new independent registration representing the current manipulation state. More...
 
void ApplyTranslationDelta (const mitk::Vector3D &delta)
 Applies an incremental translation in world coordinates to the current transform. More...
 
void ApplyRotationDelta (const mitk::Vector3D &axis, double angleDeg)
 Applies an incremental rotation around the given world-space axis. More...
 

Protected Slots

void OnRotXChanged (double)
 
void OnRotYChanged (double)
 
void OnRotZChanged (double)
 
void OnTransXChanged (double)
 
void OnTransYChanged (double)
 
void OnTransZChanged (double)
 
void OnRotXSlideChanged (int)
 
void OnRotYSlideChanged (int)
 
void OnRotZSlideChanged (int)
 
void OnTransXSlideChanged (int)
 
void OnTransYSlideChanged (int)
 
void OnTransZSlideChanged (int)
 

Detailed Description

Widget for interactively manipulating a 3D rigid registration (rotation and translation).

This widget provides sliders and spin boxes for adjusting the rotation (Euler angles around X, Y, Z in degrees) and translation (X, Y, Z in mm) of a 3D rigid transform based on itk::Euler3DTransform. The manipulated registration can optionally be composed with a preceding (baseline) registration.

The widget maintains both direct and inverse transforms internally and emits RegistrationChanged whenever the transform is changed, either by the user via the widget controls or programmatically through ApplyTranslationDelta() / ApplyRotationDelta(). The interim registration can be queried at any time via GetInterimRegistration(), while GenerateRegistration() creates a finalized independent copy (optionally composed with the preceding registration).

The center of rotation can be configured to be relative to the target space (in which case it is automatically updated through the inverse transform) or relative to the moving space.

See also
QmitkRegistrationJob, mitk::MAPRegistrationWrapper

Definition at line 56 of file QmitkRegistrationManipulationWidget.h.

Member Typedef Documentation

◆ MAPRegistrationType

typedef map::core::Registration<3, 3> QmitkRegistrationManipulationWidget::MAPRegistrationType

Type alias for a 3D-to-3D MatchPoint registration.

Definition at line 71 of file QmitkRegistrationManipulationWidget.h.

Constructor & Destructor Documentation

◆ QmitkRegistrationManipulationWidget()

QmitkRegistrationManipulationWidget::QmitkRegistrationManipulationWidget ( QWidget *  parent = nullptr)

Constructs the registration manipulation widget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkRegistrationManipulationWidget()

QmitkRegistrationManipulationWidget::~QmitkRegistrationManipulationWidget ( )
override

Destructor.

Member Function Documentation

◆ ApplyRotationDelta()

void QmitkRegistrationManipulationWidget::ApplyRotationDelta ( const mitk::Vector3D &  axis,
double  angleDeg 
)

Applies an incremental rotation around the given world-space axis.

The rotation is composed with the current rotation matrix and decomposed back into Euler angles. The pivot point matches the current center-of-rotation configuration of the widget. Updates the widget controls and emits RegistrationChanged.

Parameters
[in]axisRotation axis in world coordinates (e.g. view plane normal).
[in]angleDegRotation angle in degrees.
Precondition
axis must be a non-zero vector. It will be normalized internally.

◆ ApplyTranslationDelta()

void QmitkRegistrationManipulationWidget::ApplyTranslationDelta ( const mitk::Vector3D &  delta)

Applies an incremental translation in world coordinates to the current transform.

Updates the widget controls and emits RegistrationChanged.

Parameters
[in]deltaTranslation vector to add to the current translation, in world (mm) coordinates.
Precondition
delta must be a valid 3D vector (no NaN/Inf components).

◆ GenerateRegistration()

map::core::RegistrationBase::Pointer QmitkRegistrationManipulationWidget::GenerateRegistration ( ) const

Generates a new independent registration representing the current manipulation state.

Creates a new registration with both direct and inverse mapping kernels. If a preceding registration was set via Initialize(), the result is the composition of the preceding registration and the current manipulation transform.

Returns
Smart pointer to the newly created registration. Ownership is transferred to the caller.

◆ GetInterimRegistration()

map::core::RegistrationBase* QmitkRegistrationManipulationWidget::GetInterimRegistration ( ) const

Returns the current interim registration reflecting the widget's transform state.

The returned registration is the internal working registration and is updated live as the user manipulates the controls. It can be used for real-time visualization updates.

Returns
Pointer to the current interim registration. Ownership remains with the widget.

◆ Initialize() [1/3]

void QmitkRegistrationManipulationWidget::Initialize ( )

Initializes the widget with an identity transform.

Resets all rotation and translation parameters to zero and clears any preceding registration.

◆ Initialize() [2/3]

void QmitkRegistrationManipulationWidget::Initialize ( const mitk::Point3D &  movingReference,
const mitk::Point3D &  targetReference 
)

Initializes the widget with a translation derived from two reference points.

Computes the translation offset as targetReference - movingReference and sets this as the initial transform. No preceding registration is used.

Parameters
[in]movingReferenceA reference point in the moving image space.
[in]targetReferenceThe corresponding reference point in the target image space.

◆ Initialize() [3/3]

void QmitkRegistrationManipulationWidget::Initialize ( MAPRegistrationType *  precedingRegistration)

Initializes the widget with a preceding (baseline) registration.

Resets the current manipulation transform to identity and composes it with the given preceding registration. The final registration produced by GenerateRegistration() will combine both.

Parameters
[in]precedingRegistrationPointer to the baseline registration to build upon.
Precondition
precedingRegistration must not be nullptr.

◆ OnRotXChanged

void QmitkRegistrationManipulationWidget::OnRotXChanged ( double  )
protectedslot

◆ OnRotXSlideChanged

void QmitkRegistrationManipulationWidget::OnRotXSlideChanged ( int  )
protectedslot

◆ OnRotYChanged

void QmitkRegistrationManipulationWidget::OnRotYChanged ( double  )
protectedslot

◆ OnRotYSlideChanged

void QmitkRegistrationManipulationWidget::OnRotYSlideChanged ( int  )
protectedslot

◆ OnRotZChanged

void QmitkRegistrationManipulationWidget::OnRotZChanged ( double  )
protectedslot

◆ OnRotZSlideChanged

void QmitkRegistrationManipulationWidget::OnRotZSlideChanged ( int  )
protectedslot

◆ OnTransXChanged

void QmitkRegistrationManipulationWidget::OnTransXChanged ( double  )
protectedslot

◆ OnTransXSlideChanged

void QmitkRegistrationManipulationWidget::OnTransXSlideChanged ( int  )
protectedslot

◆ OnTransYChanged

void QmitkRegistrationManipulationWidget::OnTransYChanged ( double  )
protectedslot

◆ OnTransYSlideChanged

void QmitkRegistrationManipulationWidget::OnTransYSlideChanged ( int  )
protectedslot

◆ OnTransZChanged

void QmitkRegistrationManipulationWidget::OnTransZChanged ( double  )
protectedslot

◆ OnTransZSlideChanged

void QmitkRegistrationManipulationWidget::OnTransZSlideChanged ( int  )
protectedslot

◆ RegistrationChanged

void QmitkRegistrationManipulationWidget::RegistrationChanged ( map::core::RegistrationBase *  registration)
signal

Emitted whenever the registration transform is updated.

Triggered both by user input on the widget controls (sliders, spin boxes) and by programmatic transform changes via ApplyTranslationDelta() / ApplyRotationDelta().

Parameters
[in]registrationPointer to the updated interim registration.

◆ SetCenterOfRotation

void QmitkRegistrationManipulationWidget::SetCenterOfRotation ( const mitk::Point3D &  center)
slot

Sets the center of rotation for the Euler transform.

The center point is interpreted in either target or moving space depending on the value of SetCenterOfRotationIsRelativeToTarget().

Parameters
[in]centerThe 3D center of rotation point.

◆ SetCenterOfRotationIsRelativeToTarget

void QmitkRegistrationManipulationWidget::SetCenterOfRotationIsRelativeToTarget ( bool  targetRelative)
slot

Controls whether the center of rotation is specified relative to the target space.

If targetRelative is true, the center of rotation is given in target space coordinates and will be mapped through the inverse transform to obtain the moving-space center. If false, the center is used directly in moving space.

Parameters
[in]targetRelativeTrue for target-relative center, false for moving-relative center.

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