MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkInteractiveTransformationWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
33class 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 = {});
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
70signals:
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;
89 mitk::BaseGeometry::Pointer m_Geometry;
90 mitk::BaseGeometry::Pointer m_ResetGeometry;
91
92private:
93 void SetValuesToGUI(const mitk::AffineTransform3D::Pointer _defaultValues);
94 void SetSynchronizedValuesToSliderAndSpinbox(QDoubleSpinBox* _spinbox, QSlider* _slider, double _value);
95
96};
97#endif
An object of this class offers an UI to create a widget to access the advanced tool creation options.
Ui::QmitkInteractiveTransformationWidgetControls * m_Controls
mitk::BaseGeometry::Pointer m_Geometry
The geometry that is manipulated.
mitk::NavigationTool::Pointer m_ToolToEdit
this member holds a copy of the tool that should be edited for visualization
void EditToolTipFinished(mitk::AffineTransform3D::Pointer toolTip)
mitk::BaseGeometry::Pointer m_ResetGeometry
Lifeline to reset to the original geometry.