Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkRegistrationManipulationWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef QmitkRegistrationManipulationWidget_h
15 #define QmitkRegistrationManipulationWidget_h
16 
17 
18 #include <itkEuler3DTransform.h>
19 #include "mapRegistration.h"
20 #include "mapContinuous.h"
21 
22 #include <mitkPoint.h>
23 
24 #include <QWidget>
25 
27 
28 #include "ui_QmitkRegistrationManipulationWidget.h"
29 
30 
38 class MITKMATCHPOINTREGISTRATIONUI_EXPORT QmitkRegistrationManipulationWidget : public QWidget, private Ui::QmitkRegistrationManipulationWidget
39 {
40  Q_OBJECT
41 
42 public:
43  QmitkRegistrationManipulationWidget(QWidget *parent = nullptr);
44 
46 
48  typedef map::core::Registration<3, 3> MAPRegistrationType;
49 
51  void Initialize();
52 
54  void Initialize(MAPRegistrationType* precedingRegistration);
55 
57  void Initialize(const mitk::Point3D& movingReference, const mitk::Point3D& targetReference);
58 
61  map::core::RegistrationBase* GetInterimRegistration() const;
62 
65  map::core::RegistrationBase::Pointer GenerateRegistration()const ;
66 
67 public Q_SLOTS:
68  void SetCenterOfRotation(const mitk::Point3D& center);
69 
71  void SetCenterOfRotationIsRelativeToTarget(bool targetRelative);
72 
73 signals:
74  void RegistrationChanged(map::core::RegistrationBase *registration);
75 
76 protected slots:
77 
78  void OnRotXChanged(double);
79  void OnRotYChanged(double);
80  void OnRotZChanged(double);
81 
82  void OnTransXChanged(double);
83  void OnTransYChanged(double);
84  void OnTransZChanged(double);
85 
86  void OnRotXSlideChanged(int);
87  void OnRotYSlideChanged(int);
88  void OnRotZSlideChanged(int);
89 
90  void OnTransXSlideChanged(int);
91  void OnTransYSlideChanged(int);
92  void OnTransZSlideChanged(int);
93 
94 private:
95 
97  void ResetTransforms();
99  void InitControls();
100 
103  void UpdateTransformWidgets();
104 
107  void UpdateTransform(bool updateRotation = false);
108 
109  void ConfigureTransformCenter();
110 
111  MAPRegistrationType::Pointer m_PreRegistration;
112 
113  using TransformType = itk::Euler3DTransform<::map::core::continuous::ScalarType>;
114  TransformType::Pointer m_InverseCurrentTransform;
115  TransformType::Pointer m_DirectCurrentTransform;
116 
117  MAPRegistrationType::Pointer m_CurrentRegistration;
118  mitk::Point3D m_CenterOfRotation;
122  bool m_CenterOfRotationIsRelativeToTarget;
123 
124  bool m_internalUpdate;
125 };
126 
127 #endif
QmitkRegistrationManipulationWidget
QmitkMatchPointRegistrationManipulator.
Definition: QmitkRegistrationManipulationWidget.h:38
mitkPoint.h
mitk::Point< ScalarType, 3 >
MITKMATCHPOINTREGISTRATIONUI_EXPORT
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Definition: MitkMatchPointRegistrationUIExports.h:15
MitkMatchPointRegistrationUIExports.h
QmitkRegistrationManipulationWidget::MAPRegistrationType
map::core::Registration< 3, 3 > MAPRegistrationType
Definition: QmitkRegistrationManipulationWidget.h:48