Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
14 #define QmitkToFPointSetWidget_h
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 
118  mitk::TextAnnotation2D::Pointer m_TextAnnotationAxial;
119  mitk::TextAnnotation2D::Pointer m_TextAnnotationSagittal;
120  mitk::TextAnnotation2D::Pointer m_TextAnnotationCoronal;
121  mitk::TextAnnotation2D::Pointer m_TextAnnotation3D;
126 
131 
134 
137 // long m_DistanceImageChangedObserverTag; ///< observer tag for distance image observer
138 
140 
141  private:
142 };
143 
144 #endif
QmitkToFPointSetWidget::m_PointSet2D
mitk::PointSet::Pointer m_PointSet2D
PointSet holding the 2D ToF image points.
Definition: QmitkToFPointSetWidget.h:129
QmitkToFPointSetWidget::m_PointSet3DNode
mitk::DataNode::Pointer m_PointSet3DNode
DataNode holding the 3D ToF coordinates.
Definition: QmitkToFPointSetWidget.h:130
QmitkToFPointSetWidget::m_RendererCoronal
mitk::VtkPropRenderer::Pointer m_RendererCoronal
renderer of coronal render window
Definition: QmitkToFPointSetWidget.h:124
mitkTextAnnotation2D.h
QmitkToFPointSetWidget::m_TextAnnotationAxial
mitk::TextAnnotation2D::Pointer m_TextAnnotationAxial
text annotation used to display measurements in axial window
Definition: QmitkToFPointSetWidget.h:118
QmitkToFPointSetWidget::m_MeasurementPointSetChangedObserverTag
long m_MeasurementPointSetChangedObserverTag
observer tag for measurement PointSet observer
Definition: QmitkToFPointSetWidget.h:135
mitkDataStorage.h
mitkCameraIntrinsics.h
QmitkToFPointSetWidget
Widget allowing interaction with point sets for measurement and PointSet definition.
Definition: QmitkToFPointSetWidget.h:49
QmitkToFPointSetWidget::m_TextAnnotationCoronal
mitk::TextAnnotation2D::Pointer m_TextAnnotationCoronal
text annotation used to display measurement in axial window
Definition: QmitkToFPointSetWidget.h:120
QmitkToFPointSetWidget::m_Renderer3D
mitk::VtkPropRenderer::Pointer m_Renderer3D
renderer of 3D render window
Definition: QmitkToFPointSetWidget.h:125
itk::SmartPointer< Self >
mitkToFDistanceImageToPointSetFilter.h
QmitkToFPointSetWidget::m_RendererSagittal
mitk::VtkPropRenderer::Pointer m_RendererSagittal
renderer of sagittal render window
Definition: QmitkToFPointSetWidget.h:123
QmitkToFPointSetWidget::m_PointSetInteractor
mitk::PointSetDataInteractor::Pointer m_PointSetInteractor
PointSetInteractor used for PointSet definition.
Definition: QmitkToFPointSetWidget.h:132
mitkPointSet.h
QmitkToFPointSetWidget::m_RendererAxial
mitk::VtkPropRenderer::Pointer m_RendererAxial
renderer of axial render window
Definition: QmitkToFPointSetWidget.h:122
QmitkToFPointSetWidget::m_DataStorage
mitk::DataStorage::Pointer m_DataStorage
member holding the set DataStorage
Definition: QmitkToFPointSetWidget.h:113
QmitkToFPointSetWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkToFPointSetWidget.h:56
QmitkToFPointSetWidget::m_TextAnnotationSagittal
mitk::TextAnnotation2D::Pointer m_TextAnnotationSagittal
text annotation used to display measurement in axial window
Definition: QmitkToFPointSetWidget.h:119
QmitkToFPointSetWidget::m_MeasurementPointSetInteractor
mitk::PointSetDataInteractor::Pointer m_MeasurementPointSetInteractor
PointSetInteractor used for measurement.
Definition: QmitkToFPointSetWidget.h:133
QmitkToFPointSetWidget::m_CameraIntrinsics
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
intrinsic parameters of the camera
Definition: QmitkToFPointSetWidget.h:116
mitkPropertyList.h
QmitkToFPointSetWidget::m_DistanceImage
mitk::Image::Pointer m_DistanceImage
image holding the range data of the ToF camera
Definition: QmitkToFPointSetWidget.h:115
QmitkToFPointSetWidget::m_MeasurementPointSet2D
mitk::PointSet::Pointer m_MeasurementPointSet2D
PointSet holding the 2D ToF image point selection used for measuring.
Definition: QmitkToFPointSetWidget.h:127
mitkPointSetDataInteractor.h
QmitkToFPointSetWidget::m_TextAnnotation3D
mitk::TextAnnotation2D::Pointer m_TextAnnotation3D
text annotation used to display measurement in 3d window
Definition: QmitkToFPointSetWidget.h:121
QmitkToFPointSetWidget::m_PointSetChangedObserverTag
long m_PointSetChangedObserverTag
observer tag for PointSet observer
Definition: QmitkToFPointSetWidget.h:136
QmitkToFPointSetWidget::m_Controls
Ui::QmitkToFPointSetWidgetControls * m_Controls
member holding the UI elements of this widget
Definition: QmitkToFPointSetWidget.h:111
QmitkToFPointSetWidget::m_WindowHeight
int m_WindowHeight
Height of the renderWindow.
Definition: QmitkToFPointSetWidget.h:139
QmitkToFPointSetWidget::m_MeasurementPointSet3DNode
mitk::DataNode::Pointer m_MeasurementPointSet3DNode
DataNode holding the 3D ToF coordinates used for measuring.
Definition: QmitkToFPointSetWidget.h:128
QmitkRenderWindow.h