Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkToFSurfaceGenerationWidget Class Reference

#include <QmitkToFSurfaceGenerationWidget.h>

Inheritance diagram for QmitkToFSurfaceGenerationWidget:
Collaboration diagram for QmitkToFSurfaceGenerationWidget:

Public Member Functions

 QmitkToFSurfaceGenerationWidget (QWidget *p=0, Qt::WindowFlags f1=0)
 
virtual ~QmitkToFSurfaceGenerationWidget ()
 
virtual void CreateQtPartControl (QWidget *parent)
 
virtual void CreateConnections ()
 
mitk::ToFDistanceImageToSurfaceFilter::Pointer GetToFDistanceImageToSurfaceFilter ()
 GetToFDistanceImageToSurfaceFilter Get the internally used surface generation filter. More...
 
bool IsActive ()
 IsActive Check if the widget was initialized correctly. More...
 
void Initialize (mitk::ToFDistanceImageToSurfaceFilter::Pointer filter, mitk::ToFImageGrabber::Pointer grabber, mitk::CameraIntrinsics::Pointer intrinsics, mitk::DataNode::Pointer surface, vtkSmartPointer< vtkCamera > camera, bool generateSurface=false, bool showAdvancedOptions=true)
 Initialize Initialize the surface generation widget. More...
 
bool UpdateSurface ()
 UpdateSurface Generate new surface data according to the device properties. More...
 
mitk::Surface::Pointer GetSurface ()
 GetSurface Get the generated surface. More...
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnRepresentationChanged (int index)
 OnRepresentationChanged Change the representation of the surface. In other words: disable/enable triangulation (Point cloud/surface). If triangulation is enabled, this will also allow for editing a threshold for triangulating vertices. More...
 
void OnReconstructionChanged (int index)
 OnReconstructionChanged Change the reconstruction mode of the ToFDistanceImageToSurfaceFilter. More...
 
void OnCompute3DDataCheckboxChecked (bool checked)
 OnCompute3DDataCheckboxChecked Slot beeing called, if the "surface"-checkbox is clicked. This method initializes the surface once, if it is necessary. More...
 
void OnShowAdvancedOptionsCheckboxChecked (bool checked)
 OnShowAdvancedOptionsCheckboxChecked Show/hide advanced options. More...
 
void OnTriangulationThresholdSpinBoxChanged ()
 Slot trigged from the triangulation threshold spin box. Changed the threshold for connecting a vertex during triangulation. More...
 
void OnDistanceColorMapCheckBoxChecked (bool checked)
 OnDistanceColorMapCheckBoxChecked Show the distance color mapping (vtkColorTransferFunction) on the surface. More...
 
void OnRGBTextureCheckBoxChecked (bool checked)
 OnRGBTextureCheckBoxChecked Put the RGB image as texture on the generated surface/point cloud. More...
 

Protected Attributes

Ui::QmitkToFSurfaceGenerationWidgetControls * m_Controls
 

Detailed Description

Documentation:

This widget provides GUI access for all basic surface generation properties and can be reused in any other GUI.

Definition at line 46 of file QmitkToFSurfaceGenerationWidget.h.

Constructor & Destructor Documentation

QmitkToFSurfaceGenerationWidget::QmitkToFSurfaceGenerationWidget ( QWidget *  p = 0,
Qt::WindowFlags  f1 = 0 
)

Definition at line 30 of file QmitkToFSurfaceGenerationWidget.cpp.

References CreateQtPartControl().

QmitkToFSurfaceGenerationWidget::~QmitkToFSurfaceGenerationWidget ( )
virtual

Definition at line 40 of file QmitkToFSurfaceGenerationWidget.cpp.

Member Function Documentation

void QmitkToFSurfaceGenerationWidget::CreateQtPartControl ( QWidget *  parent)
virtual
mitk::Surface::Pointer QmitkToFSurfaceGenerationWidget::GetSurface ( )

GetSurface Get the generated surface.

Returns
Surface.

Definition at line 291 of file QmitkToFSurfaceGenerationWidget.cpp.

mitk::ToFDistanceImageToSurfaceFilter::Pointer QmitkToFSurfaceGenerationWidget::GetToFDistanceImageToSurfaceFilter ( )

GetToFDistanceImageToSurfaceFilter Get the internally used surface generation filter.

Returns
ToFDistanceImageToSurfaceFilter as filter.

Definition at line 70 of file QmitkToFSurfaceGenerationWidget.cpp.

void QmitkToFSurfaceGenerationWidget::Initialize ( mitk::ToFDistanceImageToSurfaceFilter::Pointer  filter,
mitk::ToFImageGrabber::Pointer  grabber,
mitk::CameraIntrinsics::Pointer  intrinsics,
mitk::DataNode::Pointer  surface,
vtkSmartPointer< vtkCamera >  camera,
bool  generateSurface = false,
bool  showAdvancedOptions = true 
)

Initialize Initialize the surface generation widget.

Parameters
filterToFDistanceImageToSurfaceFilter for surface computation.
grabberToFImageGrabber to get/set device properties.
intrinsicsIntrincs of the device.
surfaceGenerated Surface.
generateSurfaceCheck the generate surface combo box.
showAdvancedOptionsShow/Hide advanced options.

Definition at line 86 of file QmitkToFSurfaceGenerationWidget.cpp.

References m_Controls, mitk::Surface::New(), and OnShowAdvancedOptionsCheckboxChecked().

bool QmitkToFSurfaceGenerationWidget::IsActive ( )

IsActive Check if the widget was initialized correctly.

Returns
True for success.

Definition at line 120 of file QmitkToFSurfaceGenerationWidget.cpp.

References MITK_ERROR.

Referenced by OnReconstructionChanged(), OnRepresentationChanged(), OnRGBTextureCheckBoxChecked(), OnTriangulationThresholdSpinBoxChanged(), and UpdateSurface().

void QmitkToFSurfaceGenerationWidget::OnCompute3DDataCheckboxChecked ( bool  checked)
protectedslot

OnCompute3DDataCheckboxChecked Slot beeing called, if the "surface"-checkbox is clicked. This method initializes the surface once, if it is necessary.

Parameters
checkedIs it checked or not?

Definition at line 242 of file QmitkToFSurfaceGenerationWidget.cpp.

References mitk::ToFProcessingCommon::CalculateViewAngle(), mitk::RenderingManager::GetInstance(), mitk::RenderingManager::InitializeViews(), m_Controls, MITK_DEBUG, OnRepresentationChanged(), and mitk::RenderingManager::REQUEST_UPDATE_3DWINDOWS.

Referenced by CreateConnections().

void QmitkToFSurfaceGenerationWidget::OnDistanceColorMapCheckBoxChecked ( bool  checked)
protectedslot

OnDistanceColorMapCheckBoxChecked Show the distance color mapping (vtkColorTransferFunction) on the surface.

Parameters
checkedShow/hide.

Definition at line 206 of file QmitkToFSurfaceGenerationWidget.cpp.

Referenced by CreateConnections().

void QmitkToFSurfaceGenerationWidget::OnReconstructionChanged ( int  index)
protectedslot

OnReconstructionChanged Change the reconstruction mode of the ToFDistanceImageToSurfaceFilter.

Definition at line 138 of file QmitkToFSurfaceGenerationWidget.cpp.

References IsActive(), mitk::ToFDistanceImageToSurfaceFilter::Kinect, MITK_ERROR, mitk::ToFDistanceImageToSurfaceFilter::WithInterPixelDistance, and mitk::ToFDistanceImageToSurfaceFilter::WithOutInterPixelDistance.

Referenced by CreateConnections().

void QmitkToFSurfaceGenerationWidget::OnRepresentationChanged ( int  index)
protectedslot

OnRepresentationChanged Change the representation of the surface. In other words: disable/enable triangulation (Point cloud/surface). If triangulation is enabled, this will also allow for editing a threshold for triangulating vertices.

Definition at line 170 of file QmitkToFSurfaceGenerationWidget.cpp.

References IsActive(), and m_Controls.

Referenced by CreateConnections(), and OnCompute3DDataCheckboxChecked().

void QmitkToFSurfaceGenerationWidget::OnRGBTextureCheckBoxChecked ( bool  checked)
protectedslot

OnRGBTextureCheckBoxChecked Put the RGB image as texture on the generated surface/point cloud.

Parameters
checkedShow/hide texture.

Definition at line 188 of file QmitkToFSurfaceGenerationWidget.cpp.

References IsActive(), and mitk::SmartPointerProperty::New().

Referenced by CreateConnections().

void QmitkToFSurfaceGenerationWidget::OnShowAdvancedOptionsCheckboxChecked ( bool  checked)
protectedslot

OnShowAdvancedOptionsCheckboxChecked Show/hide advanced options.

Parameters
checkedshow/hide

Definition at line 75 of file QmitkToFSurfaceGenerationWidget.cpp.

References m_Controls.

Referenced by CreateConnections(), CreateQtPartControl(), and Initialize().

void QmitkToFSurfaceGenerationWidget::OnTriangulationThresholdSpinBoxChanged ( )
protectedslot

Slot trigged from the triangulation threshold spin box. Changed the threshold for connecting a vertex during triangulation.

Definition at line 129 of file QmitkToFSurfaceGenerationWidget.cpp.

References IsActive(), and m_Controls.

Referenced by CreateConnections().

bool QmitkToFSurfaceGenerationWidget::UpdateSurface ( )

UpdateSurface Generate new surface data according to the device properties.

Returns
True for success.

Definition at line 214 of file QmitkToFSurfaceGenerationWidget.cpp.

References IsActive(), and m_Controls.

Member Data Documentation

Ui::QmitkToFSurfaceGenerationWidgetControls* QmitkToFSurfaceGenerationWidget::m_Controls
protected
const std::string QmitkToFSurfaceGenerationWidget::VIEW_ID
static

Definition at line 54 of file QmitkToFSurfaceGenerationWidget.h.


The documentation for this class was generated from the following files: