Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkToFSurfaceGenerationWidget.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 _QMITKTOFSURFACEGENERATIONWIDGET_H_INCLUDED
14 #define _QMITKTOFSURFACEGENERATIONWIDGET_H_INCLUDED
15 
16 #include <MitkToFUIExports.h>
17 #include "ui_QmitkToFSurfaceGenerationWidgetControls.h"
18 
19 // QT headers
20 #include <QWidget>
21 
22 // vtk includes
23 #include <vtkColorTransferFunction.h>
24 #include <vtkCamera.h>
25 #include <vtkSmartPointer.h>
26 
27 //MITK
28 #include <mitkDataNode.h>
30 #include <mitkToFImageGrabber.h>
31 #include <mitkCameraIntrinsics.h>
32 #include <mitkSurface.h>
33 
35 
42 class MITKTOFUI_EXPORT QmitkToFSurfaceGenerationWidget :public QWidget
43 {
44 
45  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
46  Q_OBJECT
47 
48  public:
49 
50  static const std::string VIEW_ID;
51 
52  QmitkToFSurfaceGenerationWidget (QWidget* p = nullptr, Qt::WindowFlags f1 = nullptr);
54 
55  /* @brief Automatically called method. */
56  virtual void CreateQtPartControl(QWidget *parent);
57  /* @brief Automatically called method. Creation of the connections of main and control widget.)*/
58  virtual void CreateConnections();
59 
60 
65  mitk::ToFDistanceImageToSurfaceFilter::Pointer GetToFDistanceImageToSurfaceFilter();
66 
71  bool IsActive();
72 
82  void Initialize(mitk::ToFDistanceImageToSurfaceFilter::Pointer filter, mitk::ToFImageGrabber::Pointer grabber, mitk::CameraIntrinsics::Pointer intrinsics,
83  mitk::DataNode::Pointer surface, vtkSmartPointer<vtkCamera> camera, bool generateSurface = false, bool showAdvancedOptions = true);
84 
89  bool UpdateSurface();
90 
95  mitk::Surface::Pointer GetSurface();
96 
97 protected slots:
103  void OnRepresentationChanged(int index);
107  void OnReconstructionChanged(int index);
108 
113  void OnCompute3DDataCheckboxChecked(bool checked);
118  void OnShowAdvancedOptionsCheckboxChecked(bool checked);
119 
123  void OnTriangulationThresholdSpinBoxChanged();
124 
129  void OnDistanceColorMapCheckBoxChecked(bool checked);
130 
135  void OnRGBTextureCheckBoxChecked(bool checked);
136 
137 
138  protected:
139 
140  Ui::QmitkToFSurfaceGenerationWidgetControls* m_Controls;
141 
142 
143  private:
144  void FindReconstructionModeProperty();
145 
146  mitk::ToFDistanceImageToSurfaceFilter::Pointer m_ToFDistanceImageToSurfaceFilter;
147  mitk::ToFImageGrabber::Pointer m_ToFImageGrabber;
148  mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
149  mitk::DataNode::Pointer m_SurfaceNode;
150  mitk::Surface::Pointer m_Surface;
151  bool m_Active;
152  vtkSmartPointer<vtkCamera> m_Camera3d;
153 
154 };
155 
156 #endif // _QMITKTOFVISUALISATIONSETTINGSWIDGET_H_INCLUDED
The &#39;QmitkStdMultiWidget&#39; is a &#39;QmitkAbstractMultiWidget&#39; that is used to display multiple render win...
Ui::QmitkToFSurfaceGenerationWidgetControls * m_Controls