Medical Imaging Interaction Toolkit  2023.12.00
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
14 #define QmitkToFSurfaceGenerationWidget_h
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 
40 class MITKTOFUI_EXPORT QmitkToFSurfaceGenerationWidget :public QWidget
41 {
42 
43  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
44  Q_OBJECT
45 
46  public:
47 
48  static const std::string VIEW_ID;
49 
50  QmitkToFSurfaceGenerationWidget (QWidget* p = nullptr, Qt::WindowFlags f1 = nullptr);
52 
53  /* @brief Automatically called method. */
54  virtual void CreateQtPartControl(QWidget *parent);
55  /* @brief Automatically called method. Creation of the connections of main and control widget.)*/
56  virtual void CreateConnections();
57 
58 
63  mitk::ToFDistanceImageToSurfaceFilter::Pointer GetToFDistanceImageToSurfaceFilter();
64 
69  bool IsActive();
70 
81  void Initialize(mitk::ToFDistanceImageToSurfaceFilter::Pointer filter, mitk::ToFImageGrabber::Pointer grabber, mitk::CameraIntrinsics::Pointer intrinsics,
82  mitk::DataNode::Pointer surface, vtkSmartPointer<vtkCamera> camera, bool generateSurface = false, bool showAdvancedOptions = true);
83 
88  bool UpdateSurface();
89 
94  mitk::Surface::Pointer GetSurface();
95 
96 protected slots:
102  void OnRepresentationChanged(int index);
106  void OnReconstructionChanged(int index);
107 
112  void OnCompute3DDataCheckboxChecked(bool checked);
117  void OnShowAdvancedOptionsCheckboxChecked(bool checked);
118 
122  void OnTriangulationThresholdSpinBoxChanged();
123 
128  void OnDistanceColorMapCheckBoxChecked(bool checked);
129 
134  void OnRGBTextureCheckBoxChecked(bool checked);
135 
136 
137  protected:
138 
139  Ui::QmitkToFSurfaceGenerationWidgetControls* m_Controls;
140 
141 
142  private:
143  void FindReconstructionModeProperty();
144 
145  mitk::ToFDistanceImageToSurfaceFilter::Pointer m_ToFDistanceImageToSurfaceFilter;
146  mitk::ToFImageGrabber::Pointer m_ToFImageGrabber;
147  mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
148  mitk::DataNode::Pointer m_SurfaceNode;
149  mitk::Surface::Pointer m_Surface;
150  bool m_Active;
151  vtkSmartPointer<vtkCamera> m_Camera3d;
152 
153 };
154 
155 #endif
QmitkToFSurfaceGenerationWidget::m_Controls
Ui::QmitkToFSurfaceGenerationWidgetControls * m_Controls
Definition: QmitkToFSurfaceGenerationWidget.h:139
mitkCameraIntrinsics.h
QmitkToFSurfaceGenerationWidget
Definition: QmitkToFSurfaceGenerationWidget.h:40
vtkSmartPointer< vtkCamera >
itk::SmartPointer< Self >
mitkSurface.h
mitkDataNode.h
mitk::ImageSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkImageSource.h:39
mitkToFImageGrabber.h
QmitkToFSurfaceGenerationWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkToFSurfaceGenerationWidget.h:48
mitkToFDistanceImageToSurfaceFilter.h