Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkToFPointSetWidget.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 _QmitkToFPointSetWidget_H_INCLUDED
14 #define _QmitkToFPointSetWidget_H_INCLUDED
15 
16 #include <MitkToFUIExports.h>
17 #include "ui_QmitkToFPointSetWidgetControls.h"
18 
19 //mitk headers
20 #include <mitkCameraIntrinsics.h>
21 #include <mitkDataStorage.h>
22 #include <mitkPointSet.h>
24 #include <mitkPropertyList.h>
25 #include <mitkTextAnnotation2D.h>
27 
28 //Qmitk headers
29 #include <QmitkRenderWindow.h>
30 
31 // vtk includes
32 #include <vtkSmartPointer.h>
33 #include <vtkTextActor.h>
34 #include <vtkRenderer.h>
35 
49 class MITKTOFUI_EXPORT QmitkToFPointSetWidget :public QWidget
50 {
51  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
52  Q_OBJECT
53 
54  public:
55 
56  static const std::string VIEW_ID;
57 
58  QmitkToFPointSetWidget(QWidget* p = nullptr, Qt::WindowFlags f1 = nullptr);
59  ~QmitkToFPointSetWidget() override;
60 
61  /* @brief This method is part of the widget an needs not to be called seperately. */
62  virtual void CreateQtPartControl(QWidget *parent);
63  /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/
64  virtual void CreateConnections();
65 
73  void InitializeWidget(QHash<QString, QmitkRenderWindow*> renderWindowHashMap, mitk::DataStorage::Pointer dataStorage, mitk::CameraIntrinsics::Pointer cameraIntrinsics=nullptr);
78  void CleanUpWidget();
82  void SetDistanceImage(mitk::Image::Pointer distanceImage);
86  void SetCameraIntrinsics(mitk::CameraIntrinsics::Pointer cameraIntrinsics);
87 
88  signals:
89 
90  protected slots:
94  void OnMeasurement();
98  void OnPointSet();
99 
100  protected:
101 
105  void MeasurementPointSetChanged();
109  void PointSetChanged();
110 
111  Ui::QmitkToFPointSetWidgetControls* m_Controls;
112 
114 
116  mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
117 
126 
131 
134 
137 // long m_DistanceImageChangedObserverTag; ///< observer tag for distance image observer
138 
140 
141  private:
142 };
143 
144 #endif // _QmitkToFPointSetWidget_H_INCLUDED
mitk::TextAnnotation2D::Pointer m_TextAnnotationCoronal
text annotation used to display measurement in axial window
mitk::VtkPropRenderer::Pointer m_RendererSagittal
renderer of sagittal render window
static const std::string VIEW_ID
mitk::VtkPropRenderer::Pointer m_RendererAxial
renderer of axial render window
mitk::PointSetDataInteractor::Pointer m_MeasurementPointSetInteractor
PointSetInteractor used for measurement.
long m_PointSetChangedObserverTag
observer tag for PointSet observer
mitk::DataNode::Pointer m_PointSet3DNode
DataNode holding the 3D ToF coordinates.
mitk::Image::Pointer m_DistanceImage
image holding the range data of the ToF camera
mitk::DataNode::Pointer m_MeasurementPointSet3DNode
DataNode holding the 3D ToF coordinates used for measuring.
mitk::TextAnnotation2D::Pointer m_TextAnnotation3D
text annotation used to display measurement in 3d window
long m_MeasurementPointSetChangedObserverTag
observer tag for measurement PointSet observer
mitk::PointSet::Pointer m_MeasurementPointSet2D
PointSet holding the 2D ToF image point selection used for measuring.
Ui::QmitkToFPointSetWidgetControls * m_Controls
member holding the UI elements of this widget
Widget allowing interaction with point sets for measurement and PointSet definition.
mitk::PointSet::Pointer m_PointSet2D
PointSet holding the 2D ToF image points.
int m_WindowHeight
Height of the renderWindow.
mitk::VtkPropRenderer::Pointer m_RendererCoronal
renderer of coronal render window
mitk::TextAnnotation2D::Pointer m_TextAnnotationSagittal
text annotation used to display measurement in axial window
mitk::DataStorage::Pointer m_DataStorage
member holding the set DataStorage
mitk::TextAnnotation2D::Pointer m_TextAnnotationAxial
text annotation used to display measurements in axial window
mitk::VtkPropRenderer::Pointer m_Renderer3D
renderer of 3D render window
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
intrinsic parameters of the camera
mitk::PointSetDataInteractor::Pointer m_PointSetInteractor
PointSetInteractor used for PointSet definition.