Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QmitkInteractiveTransformationWidget_H
18 #define QmitkInteractiveTransformationWidget_H
19 
20 //QT headers
21 #include <QWidget>
22 
23 //Mitk headers
24 #include "MitkIGTUIExports.h"
25 #include "mitkVector.h"
26 #include "mitkGeometry3D.h"
27 
28 //ui header
29 #include "ui_QmitkInteractiveTransformationWidgetControls.h"
30 
37 class MITKIGTUI_EXPORT QmitkInteractiveTransformationWidget : public QWidget
38 {
39  Q_OBJECT
40 
41  public:
42  static const std::string VIEW_ID;
43 
44  QmitkInteractiveTransformationWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
46 
51  void SetGeometry(mitk::BaseGeometry::Pointer geometry, mitk::BaseGeometry::Pointer defaultValues = nullptr);
52 
53  mitk::BaseGeometry::Pointer GetGeometry();
54 
55  protected slots:
56  void OnZTranslationValueChanged( int v );
57  void OnYTranslationValueChanged( int v );
58  void OnXTranslationValueChanged( int v );
59  void OnZRotationValueChanged( int v );
60  void OnYRotationValueChanged( int v );
61  void OnXRotationValueChanged( int v );
62  void OnResetGeometry();
63  void OnApplyManipulatedToolTip();
64 
65 signals:
66  void ApplyManipulatedToolTip();
67 
68  protected:
69 
70  virtual void CreateConnections();
71 
72  virtual void CreateQtPartControl(QWidget *parent);
73 
74  void SetSliderX(int v);
75  void SetSliderY(int v);
76  void SetSliderZ(int v);
77 
80  void Translate( mitk::Vector3D translateVector);
81 
84  void Rotate(mitk::Vector3D rotateVector);
85 
86  // Member variables
87  Ui::QmitkInteractiveTransformationWidgetControls* m_Controls;
88 
93 };
94 #endif // QmitkInteractiveTransformationWidget_H
mitk::BaseGeometry::Pointer m_Geometry
Initial geometry that is manipulated.
mitk::Vector3D m_TranslationVector
Accumulated translation vector.
An object of this class offers an UI to create a widget to access the advance tool creation options...
mitk::Vector3D m_RotateSliderPos
Accumulated rotation vector (holds degree around x,y,z direction)
mitk::BaseGeometry::Pointer m_ResetGeometry
Lifeline to reset to the initial geometry.
Ui::QmitkInteractiveTransformationWidgetControls * m_Controls