Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
QmitkToFPointSetWidget Class Reference

Widget allowing interaction with point sets for measurement and PointSet definition. More...

#include <QmitkToFPointSetWidget.h>

Inheritance diagram for QmitkToFPointSetWidget:
Collaboration diagram for QmitkToFPointSetWidget:

Public Member Functions

 QmitkToFPointSetWidget (QWidget *p=nullptr, Qt::WindowFlags f1=nullptr)
 
 ~QmitkToFPointSetWidget () override
 
virtual void CreateQtPartControl (QWidget *parent)
 
virtual void CreateConnections ()
 
void InitializeWidget (QHash< QString, QmitkRenderWindow * > renderWindowHashMap, mitk::DataStorage::Pointer dataStorage, mitk::CameraIntrinsics::Pointer cameraIntrinsics=nullptr)
 initializes the widget. Observers to the change events of the point sets are created, text actors are activated to be rendered into the foreground of the render window. More...
 
void CleanUpWidget ()
 cleans up the widget when it's functionality is not used anymore. Removes observers and deletes foreground renderer More...
 
void SetDistanceImage (mitk::Image::Pointer distanceImage)
 set the image holding the distance information used for measuring More...
 
void SetCameraIntrinsics (mitk::CameraIntrinsics::Pointer cameraIntrinsics)
 Set intrinsic parameters of the used device. More...
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnMeasurement ()
 Activates the interactor for the measurement point set. More...
 
void OnPointSet ()
 Activates the interactor for the point set. More...
 

Protected Member Functions

void MeasurementPointSetChanged ()
 function called when the 2D measurement PointSet has changed More...
 
void PointSetChanged ()
 function called when the 2D PointSet has changed More...
 

Protected Attributes

Ui::QmitkToFPointSetWidgetControls * m_Controls
 member holding the UI elements of this widget More...
 
mitk::DataStorage::Pointer m_DataStorage
 member holding the set DataStorage More...
 
mitk::Image::Pointer m_DistanceImage
 image holding the range data of the ToF camera More...
 
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
 intrinsic parameters of the camera More...
 
mitk::TextAnnotation2D::Pointer m_TextAnnotationAxial
 text annotation used to display measurements in axial window More...
 
mitk::TextAnnotation2D::Pointer m_TextAnnotationSagittal
 text annotation used to display measurement in axial window More...
 
mitk::TextAnnotation2D::Pointer m_TextAnnotationCoronal
 text annotation used to display measurement in axial window More...
 
mitk::TextAnnotation2D::Pointer m_TextAnnotation3D
 text annotation used to display measurement in 3d window More...
 
mitk::VtkPropRenderer::Pointer m_RendererAxial
 renderer of axial render window More...
 
mitk::VtkPropRenderer::Pointer m_RendererSagittal
 renderer of sagittal render window More...
 
mitk::VtkPropRenderer::Pointer m_RendererCoronal
 renderer of coronal render window More...
 
mitk::VtkPropRenderer::Pointer m_Renderer3D
 renderer of 3D render window More...
 
mitk::PointSet::Pointer m_MeasurementPointSet2D
 PointSet holding the 2D ToF image point selection used for measuring. More...
 
mitk::DataNode::Pointer m_MeasurementPointSet3DNode
 DataNode holding the 3D ToF coordinates used for measuring. More...
 
mitk::PointSet::Pointer m_PointSet2D
 PointSet holding the 2D ToF image points. More...
 
mitk::DataNode::Pointer m_PointSet3DNode
 DataNode holding the 3D ToF coordinates. More...
 
mitk::PointSetDataInteractor::Pointer m_PointSetInteractor
 PointSetInteractor used for PointSet definition. More...
 
mitk::PointSetDataInteractor::Pointer m_MeasurementPointSetInteractor
 PointSetInteractor used for measurement. More...
 
long m_MeasurementPointSetChangedObserverTag
 observer tag for measurement PointSet observer More...
 
long m_PointSetChangedObserverTag
 observer tag for PointSet observer More...
 
int m_WindowHeight
 Height of the renderWindow. More...
 

Detailed Description

Widget allowing interaction with point sets for measurement and PointSet definition.

The widget allows to

  1. Measure the distance between two points in 3D ToF space by clicking the points in the 2D slices
  2. Defining a ToF PointSet both in 2D and 3D. CameraIntrinsics are used for calculation between 2D and 3D

NOTE: You have to make sure that the widget is initialized at a position in the plugin using it, where the distance image is available. CleanUp has to be called to make sure that all observers and renderers are removed correctly.

Definition at line 49 of file QmitkToFPointSetWidget.h.

Constructor & Destructor Documentation

◆ QmitkToFPointSetWidget()

QmitkToFPointSetWidget::QmitkToFPointSetWidget ( QWidget *  p = nullptr,
Qt::WindowFlags  f1 = nullptr 
)

◆ ~QmitkToFPointSetWidget()

QmitkToFPointSetWidget::~QmitkToFPointSetWidget ( )
override

Member Function Documentation

◆ CleanUpWidget()

void QmitkToFPointSetWidget::CleanUpWidget ( )

cleans up the widget when it's functionality is not used anymore. Removes observers and deletes foreground renderer

◆ CreateConnections()

virtual void QmitkToFPointSetWidget::CreateConnections ( )
virtual

◆ CreateQtPartControl()

virtual void QmitkToFPointSetWidget::CreateQtPartControl ( QWidget *  parent)
virtual

◆ InitializeWidget()

void QmitkToFPointSetWidget::InitializeWidget ( QHash< QString, QmitkRenderWindow * >  renderWindowHashMap,
mitk::DataStorage::Pointer  dataStorage,
mitk::CameraIntrinsics::Pointer  cameraIntrinsics = nullptr 
)

initializes the widget. Observers to the change events of the point sets are created, text actors are activated to be rendered into the foreground of the render window.

Parameters
renderWindowHashMap
dataStorageDataStorage to add PointSets
cameraIntrinsics

◆ MeasurementPointSetChanged()

void QmitkToFPointSetWidget::MeasurementPointSetChanged ( )
protected

function called when the 2D measurement PointSet has changed

◆ OnMeasurement

void QmitkToFPointSetWidget::OnMeasurement ( )
protectedslot

Activates the interactor for the measurement point set.

◆ OnPointSet

void QmitkToFPointSetWidget::OnPointSet ( )
protectedslot

Activates the interactor for the point set.

◆ PointSetChanged()

void QmitkToFPointSetWidget::PointSetChanged ( )
protected

function called when the 2D PointSet has changed

◆ SetCameraIntrinsics()

void QmitkToFPointSetWidget::SetCameraIntrinsics ( mitk::CameraIntrinsics::Pointer  cameraIntrinsics)

Set intrinsic parameters of the used device.

◆ SetDistanceImage()

void QmitkToFPointSetWidget::SetDistanceImage ( mitk::Image::Pointer  distanceImage)

set the image holding the distance information used for measuring

Member Data Documentation

◆ m_CameraIntrinsics

mitk::CameraIntrinsics::Pointer QmitkToFPointSetWidget::m_CameraIntrinsics
protected

intrinsic parameters of the camera

Definition at line 116 of file QmitkToFPointSetWidget.h.

◆ m_Controls

Ui::QmitkToFPointSetWidgetControls* QmitkToFPointSetWidget::m_Controls
protected

member holding the UI elements of this widget

Definition at line 111 of file QmitkToFPointSetWidget.h.

◆ m_DataStorage

mitk::DataStorage::Pointer QmitkToFPointSetWidget::m_DataStorage
protected

member holding the set DataStorage

Definition at line 113 of file QmitkToFPointSetWidget.h.

◆ m_DistanceImage

mitk::Image::Pointer QmitkToFPointSetWidget::m_DistanceImage
protected

image holding the range data of the ToF camera

Definition at line 115 of file QmitkToFPointSetWidget.h.

◆ m_MeasurementPointSet2D

mitk::PointSet::Pointer QmitkToFPointSetWidget::m_MeasurementPointSet2D
protected

PointSet holding the 2D ToF image point selection used for measuring.

Definition at line 127 of file QmitkToFPointSetWidget.h.

◆ m_MeasurementPointSet3DNode

mitk::DataNode::Pointer QmitkToFPointSetWidget::m_MeasurementPointSet3DNode
protected

DataNode holding the 3D ToF coordinates used for measuring.

Definition at line 128 of file QmitkToFPointSetWidget.h.

◆ m_MeasurementPointSetChangedObserverTag

long QmitkToFPointSetWidget::m_MeasurementPointSetChangedObserverTag
protected

observer tag for measurement PointSet observer

Definition at line 135 of file QmitkToFPointSetWidget.h.

◆ m_MeasurementPointSetInteractor

mitk::PointSetDataInteractor::Pointer QmitkToFPointSetWidget::m_MeasurementPointSetInteractor
protected

PointSetInteractor used for measurement.

Definition at line 133 of file QmitkToFPointSetWidget.h.

◆ m_PointSet2D

mitk::PointSet::Pointer QmitkToFPointSetWidget::m_PointSet2D
protected

PointSet holding the 2D ToF image points.

Definition at line 129 of file QmitkToFPointSetWidget.h.

◆ m_PointSet3DNode

mitk::DataNode::Pointer QmitkToFPointSetWidget::m_PointSet3DNode
protected

DataNode holding the 3D ToF coordinates.

Definition at line 130 of file QmitkToFPointSetWidget.h.

◆ m_PointSetChangedObserverTag

long QmitkToFPointSetWidget::m_PointSetChangedObserverTag
protected

observer tag for PointSet observer

Definition at line 136 of file QmitkToFPointSetWidget.h.

◆ m_PointSetInteractor

mitk::PointSetDataInteractor::Pointer QmitkToFPointSetWidget::m_PointSetInteractor
protected

PointSetInteractor used for PointSet definition.

Definition at line 132 of file QmitkToFPointSetWidget.h.

◆ m_Renderer3D

mitk::VtkPropRenderer::Pointer QmitkToFPointSetWidget::m_Renderer3D
protected

renderer of 3D render window

Definition at line 125 of file QmitkToFPointSetWidget.h.

◆ m_RendererAxial

mitk::VtkPropRenderer::Pointer QmitkToFPointSetWidget::m_RendererAxial
protected

renderer of axial render window

Definition at line 122 of file QmitkToFPointSetWidget.h.

◆ m_RendererCoronal

mitk::VtkPropRenderer::Pointer QmitkToFPointSetWidget::m_RendererCoronal
protected

renderer of coronal render window

Definition at line 124 of file QmitkToFPointSetWidget.h.

◆ m_RendererSagittal

mitk::VtkPropRenderer::Pointer QmitkToFPointSetWidget::m_RendererSagittal
protected

renderer of sagittal render window

Definition at line 123 of file QmitkToFPointSetWidget.h.

◆ m_TextAnnotation3D

mitk::TextAnnotation2D::Pointer QmitkToFPointSetWidget::m_TextAnnotation3D
protected

text annotation used to display measurement in 3d window

Definition at line 121 of file QmitkToFPointSetWidget.h.

◆ m_TextAnnotationAxial

mitk::TextAnnotation2D::Pointer QmitkToFPointSetWidget::m_TextAnnotationAxial
protected

text annotation used to display measurements in axial window

Definition at line 118 of file QmitkToFPointSetWidget.h.

◆ m_TextAnnotationCoronal

mitk::TextAnnotation2D::Pointer QmitkToFPointSetWidget::m_TextAnnotationCoronal
protected

text annotation used to display measurement in axial window

Definition at line 120 of file QmitkToFPointSetWidget.h.

◆ m_TextAnnotationSagittal

mitk::TextAnnotation2D::Pointer QmitkToFPointSetWidget::m_TextAnnotationSagittal
protected

text annotation used to display measurement in axial window

Definition at line 119 of file QmitkToFPointSetWidget.h.

◆ m_WindowHeight

int QmitkToFPointSetWidget::m_WindowHeight
protected

Height of the renderWindow.

Definition at line 139 of file QmitkToFPointSetWidget.h.

◆ VIEW_ID

const std::string QmitkToFPointSetWidget::VIEW_ID
static

Definition at line 56 of file QmitkToFPointSetWidget.h.


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