Medical Imaging Interaction Toolkit  2016.11.0
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,
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 _QmitkToFPointSetWidget_H_INCLUDED
18 #define _QmitkToFPointSetWidget_H_INCLUDED
19 
20 #include <MitkToFUIExports.h>
21 #include "ui_QmitkToFPointSetWidgetControls.h"
22 
23 //mitk headers
24 #include <mitkCameraIntrinsics.h>
25 #include <mitkDataStorage.h>
26 #include <mitkPointSet.h>
28 #include <mitkPropertyList.h>
30 
31 //Qmitk headers
32 #include <QmitkRenderWindow.h>
33 
34 // vtk includes
35 #include <vtkSmartPointer.h>
36 #include <vtkTextActor.h>
37 #include <vtkRenderer.h>
38 
52 class MITKTOFUI_EXPORT QmitkToFPointSetWidget :public QWidget
53 {
54  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
55  Q_OBJECT
56 
57  public:
58 
59  static const std::string VIEW_ID;
60 
61  QmitkToFPointSetWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0);
62  virtual ~QmitkToFPointSetWidget();
63 
64  /* @brief This method is part of the widget an needs not to be called seperately. */
65  virtual void CreateQtPartControl(QWidget *parent);
66  /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/
67  virtual void CreateConnections();
68 
76  void InitializeWidget(QHash<QString, QmitkRenderWindow*> renderWindowHashMap, mitk::DataStorage::Pointer dataStorage, mitk::CameraIntrinsics::Pointer cameraIntrinsics=NULL);
81  void CleanUpWidget();
85  void SetDistanceImage(mitk::Image::Pointer distanceImage);
89  void SetCameraIntrinsics(mitk::CameraIntrinsics::Pointer cameraIntrinsics);
90 
91  signals:
92 
93  protected slots:
97  void OnMeasurement();
101  void OnPointSet();
102 
103  protected:
104 
108  void MeasurementPointSetChanged();
112  void PointSetChanged();
113 
114  Ui::QmitkToFPointSetWidgetControls* m_Controls;
115 
117 
120 
121  vtkSmartPointer<vtkTextActor> m_VtkTextActor;
122  vtkSmartPointer<vtkRenderer> m_ForegroundRenderer1;
123  vtkSmartPointer<vtkRenderer> m_ForegroundRenderer2;
124  vtkSmartPointer<vtkRenderer> m_ForegroundRenderer3;
125  vtkSmartPointer<vtkRenderWindow> m_RenderWindow1;
126  vtkSmartPointer<vtkRenderWindow> m_RenderWindow2;
127  vtkSmartPointer<vtkRenderWindow> m_RenderWindow3;
128  vtkSmartPointer<vtkRenderWindow> m_RenderWindow4;
129 
134 
137 
140 // long m_DistanceImageChangedObserverTag; ///< observer tag for distance image observer
141 
143 
144  private:
145 };
146 
147 #endif // _QmitkToFPointSetWidget_H_INCLUDED
vtkSmartPointer< vtkRenderWindow > m_RenderWindow1
vtk render window used for showing overlay in widget 1
itk::SmartPointer< Self > Pointer
vtkSmartPointer< vtkRenderWindow > m_RenderWindow3
vtk render window used for showing overlay in widget 3
vtkSmartPointer< vtkRenderWindow > m_RenderWindow2
vtk render window used for showing overlay in widget 2
static const std::string VIEW_ID
mitk::PointSetDataInteractor::Pointer m_MeasurementPointSetInteractor
PointSetInteractor used for measurement.
long m_PointSetChangedObserverTag
observer tag for PointSet observer
vtkSmartPointer< vtkRenderer > m_ForegroundRenderer3
renderer responsible for text rendering in the foreground of widget 3
mitk::DataNode::Pointer m_PointSet3DNode
DataNode holding the 3D ToF coordinates.
vtkSmartPointer< vtkRenderer > m_ForegroundRenderer1
renderer responsible for text rendering in the foreground of widget 1
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.
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.
vtkSmartPointer< vtkTextActor > m_VtkTextActor
actor containing the text of the overlay
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.
vtkSmartPointer< vtkRenderer > m_ForegroundRenderer2
renderer responsible for text rendering in the foreground of widget 2
vtkSmartPointer< vtkRenderWindow > m_RenderWindow4
vtk render window used for showing overlay in widget 3
mitk::DataStorage::Pointer m_DataStorage
member holding the set DataStorage
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
intrinsic parameters of the camera
mitk::PointSetDataInteractor::Pointer m_PointSetInteractor
PointSetInteractor used for PointSet definition.