Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkInteractiveTransformationWidget.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 #ifndef QmitkInteractiveTransformationWidget_h
14 #define QmitkInteractiveTransformationWidget_h
15 
16 //QT headers
17 #include <QDialog>
18 
19 //Mitk headers
20 #include "MitkIGTUIExports.h"
21 #include "mitkVector.h"
22 #include "mitkGeometry3D.h"
23 #include "mitkNavigationTool.h"
24 
25 //ui header
26 #include "ui_QmitkInteractiveTransformationWidgetControls.h"
27 
33 class MITKIGTUI_EXPORT QmitkInteractiveTransformationWidget : public QDialog
34 {
35  Q_OBJECT
36 
37  public:
38  static const std::string VIEW_ID;
39 
40  QmitkInteractiveTransformationWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
42 
50  void SetToolToEdit(const mitk::NavigationTool::Pointer _tool);
51 
55  void SetDefaultOffset(const mitk::Point3D _defaultValues);
56  void SetDefaultRotation(const mitk::Quaternion _defaultValues);
57 
58  protected slots:
59  void OnZTranslationValueChanged(double v);
60  void OnYTranslationValueChanged(double v);
61  void OnXTranslationValueChanged(double v);
62  void OnZRotationValueChanged(double v);
63  void OnYRotationValueChanged(double v);
64  void OnXRotationValueChanged(double v);
65  void OnResetGeometryToIdentity();
66  void OnRevertChanges();
67  void OnApplyManipulatedToolTip();
68  void OnCancel();
69 
70 signals:
71  void EditToolTipFinished(mitk::AffineTransform3D::Pointer toolTip);
72 
73  protected:
74 
75  void reject() override;
76 
77  virtual void CreateConnections();
78 
79  virtual void CreateQtPartControl(QWidget *parent);
80 
83  void Rotate(mitk::Vector3D rotateVector);
84 
85  // Member variables
86  Ui::QmitkInteractiveTransformationWidgetControls* m_Controls;
87 
88  mitk::NavigationTool::Pointer m_ToolToEdit;
91 
92 private:
93  void SetValuesToGUI(const mitk::AffineTransform3D::Pointer _defaultValues);
94  void SetSynchronizedValuesToSliderAndSpinbox(QDoubleSpinBox* _spinbox, QSlider* _slider, double _value);
95 
96 };
97 #endif
QmitkInteractiveTransformationWidget::m_ResetGeometry
mitk::BaseGeometry::Pointer m_ResetGeometry
Lifeline to reset to the original geometry.
Definition: QmitkInteractiveTransformationWidget.h:90
itk::SmartPointer< Self >
mitkGeometry3D.h
QmitkInteractiveTransformationWidget::m_Controls
Ui::QmitkInteractiveTransformationWidgetControls * m_Controls
Definition: QmitkInteractiveTransformationWidget.h:86
QmitkInteractiveTransformationWidget
An object of this class offers an UI to create a widget to access the advanced tool creation options.
Definition: QmitkInteractiveTransformationWidget.h:33
QmitkInteractiveTransformationWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkInteractiveTransformationWidget.h:38
mitk::Vector< ScalarType, 3 >
mitk::Point< ScalarType, 3 >
QmitkInteractiveTransformationWidget::m_Geometry
mitk::BaseGeometry::Pointer m_Geometry
The geometry that is manipulated.
Definition: QmitkInteractiveTransformationWidget.h:89
QmitkInteractiveTransformationWidget::m_ToolToEdit
mitk::NavigationTool::Pointer m_ToolToEdit
this member holds a copy of the tool that should be edited for visualization
Definition: QmitkInteractiveTransformationWidget.h:88
mitkVector.h
mitk::Quaternion
vnl_quaternion< ScalarType > Quaternion
Definition: mitkQuaternion.h:21
mitkNavigationTool.h