Medical Imaging Interaction Toolkit  2016.11.0
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,
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 _QMITKTOFSURFACEGENERATIONWIDGET_H_INCLUDED
18 #define _QMITKTOFSURFACEGENERATIONWIDGET_H_INCLUDED
19 
20 #include <MitkToFUIExports.h>
21 #include "ui_QmitkToFSurfaceGenerationWidgetControls.h"
22 
23 // QT headers
24 #include <QWidget>
25 
26 // vtk includes
27 #include <vtkColorTransferFunction.h>
28 #include <vtkCamera.h>
29 #include <vtkSmartPointer.h>
30 
31 //MITK
32 #include <mitkDataNode.h>
34 #include <mitkToFImageGrabber.h>
35 #include <mitkCameraIntrinsics.h>
36 #include <mitkSurface.h>
37 
39 
46 class MITKTOFUI_EXPORT QmitkToFSurfaceGenerationWidget :public QWidget
47 {
48 
49  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
50  Q_OBJECT
51 
52  public:
53 
54  static const std::string VIEW_ID;
55 
56  QmitkToFSurfaceGenerationWidget (QWidget* p = 0, Qt::WindowFlags f1 = 0);
58 
59  /* @brief Automatically called method. */
60  virtual void CreateQtPartControl(QWidget *parent);
61  /* @brief Automatically called method. Creation of the connections of main and control widget.)*/
62  virtual void CreateConnections();
63 
64 
69  mitk::ToFDistanceImageToSurfaceFilter::Pointer GetToFDistanceImageToSurfaceFilter();
70 
75  bool IsActive();
76 
87  mitk::DataNode::Pointer surface, vtkSmartPointer<vtkCamera> camera, bool generateSurface = false, bool showAdvancedOptions = true);
88 
93  bool UpdateSurface();
94 
99  mitk::Surface::Pointer GetSurface();
100 
101 protected slots:
107  void OnRepresentationChanged(int index);
111  void OnReconstructionChanged(int index);
112 
117  void OnCompute3DDataCheckboxChecked(bool checked);
122  void OnShowAdvancedOptionsCheckboxChecked(bool checked);
123 
127  void OnTriangulationThresholdSpinBoxChanged();
128 
133  void OnDistanceColorMapCheckBoxChecked(bool checked);
134 
139  void OnRGBTextureCheckBoxChecked(bool checked);
140 
141 
142  protected:
143 
144  Ui::QmitkToFSurfaceGenerationWidgetControls* m_Controls;
145 
146 
147  private:
148  void FindReconstructionModeProperty();
149 
150  mitk::ToFDistanceImageToSurfaceFilter::Pointer m_ToFDistanceImageToSurfaceFilter;
151  mitk::ToFImageGrabber::Pointer m_ToFImageGrabber;
152  mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
153  mitk::DataNode::Pointer m_SurfaceNode;
154  mitk::Surface::Pointer m_Surface;
155  bool m_Active;
156  vtkSmartPointer<vtkCamera> m_Camera3d;
157 
158 };
159 
160 #endif // _QMITKTOFVISUALISATIONSETTINGSWIDGET_H_INCLUDED
itk::SmartPointer< Self > Pointer
Ui::QmitkToFSurfaceGenerationWidgetControls * m_Controls