|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Widget for interactively manipulating a 3D rigid registration (rotation and translation). More...
#include <QmitkRegistrationManipulationWidget.h>


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 ¢er) |
| 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) |
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.
Definition at line 56 of file QmitkRegistrationManipulationWidget.h.
| 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.
| QmitkRegistrationManipulationWidget::QmitkRegistrationManipulationWidget | ( | QWidget * | parent = nullptr | ) |
Constructs the registration manipulation widget.
| [in] | parent | Optional parent widget. |
|
override |
Destructor.
| 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.
| [in] | axis | Rotation axis in world coordinates (e.g. view plane normal). |
| [in] | angleDeg | Rotation angle in degrees. |
axis must be a non-zero vector. It will be normalized internally. | 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.
| [in] | delta | Translation vector to add to the current translation, in world (mm) coordinates. |
delta must be a valid 3D vector (no NaN/Inf components). | 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.
| 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.
| void QmitkRegistrationManipulationWidget::Initialize | ( | ) |
Initializes the widget with an identity transform.
Resets all rotation and translation parameters to zero and clears any preceding registration.
| 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.
| [in] | movingReference | A reference point in the moving image space. |
| [in] | targetReference | The corresponding reference point in the target image space. |
| 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.
| [in] | precedingRegistration | Pointer to the baseline registration to build upon. |
precedingRegistration must not be nullptr.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
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().
| [in] | registration | Pointer to the updated interim registration. |
|
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().
| [in] | center | The 3D center of rotation point. |
|
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.
| [in] | targetRelative | True for target-relative center, false for moving-relative center. |