MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkToFSurfaceGenerationWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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>
32#include <mitkSurface.h>
33
40class 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 = {});
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
96protected 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;
152
153};
154
155#endif
Ui::QmitkToFSurfaceGenerationWidgetControls * m_Controls