Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Widget allowing interaction with point sets for measurement and PointSet definition. More...
#include <QmitkToFPointSetWidget.h>
Public Member Functions | |
QmitkToFPointSetWidget (QWidget *p=0, Qt::WindowFlags f1=0) | |
virtual | ~QmitkToFPointSetWidget () |
virtual void | CreateQtPartControl (QWidget *parent) |
virtual void | CreateConnections () |
void | InitializeWidget (QHash< QString, QmitkRenderWindow * > renderWindowHashMap, mitk::DataStorage::Pointer dataStorage, mitk::CameraIntrinsics::Pointer cameraIntrinsics=NULL) |
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... | |
vtkSmartPointer< vtkTextActor > | m_VtkTextActor |
actor containing the text of the overlay More... | |
vtkSmartPointer< vtkRenderer > | m_ForegroundRenderer1 |
renderer responsible for text rendering in the foreground of widget 1 More... | |
vtkSmartPointer< vtkRenderer > | m_ForegroundRenderer2 |
renderer responsible for text rendering in the foreground of widget 2 More... | |
vtkSmartPointer< vtkRenderer > | m_ForegroundRenderer3 |
renderer responsible for text rendering in the foreground of widget 3 More... | |
vtkSmartPointer< vtkRenderWindow > | m_RenderWindow1 |
vtk render window used for showing overlay in widget 1 More... | |
vtkSmartPointer< vtkRenderWindow > | m_RenderWindow2 |
vtk render window used for showing overlay in widget 2 More... | |
vtkSmartPointer< vtkRenderWindow > | m_RenderWindow3 |
vtk render window used for showing overlay in widget 3 More... | |
vtkSmartPointer< vtkRenderWindow > | m_RenderWindow4 |
vtk render window used for showing overlay in widget 3 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... | |
Widget allowing interaction with point sets for measurement and PointSet definition.
The widget allows to
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 52 of file QmitkToFPointSetWidget.h.
QmitkToFPointSetWidget::QmitkToFPointSetWidget | ( | QWidget * | p = 0 , |
Qt::WindowFlags | f1 = 0 |
||
) |
Definition at line 26 of file QmitkToFPointSetWidget.cpp.
References CreateQtPartControl(), and m_Controls.
|
virtual |
Definition at line 51 of file QmitkToFPointSetWidget.cpp.
References CleanUpWidget().
void QmitkToFPointSetWidget::CleanUpWidget | ( | ) |
cleans up the widget when it's functionality is not used anymore. Removes observers and deletes foreground renderer
Definition at line 196 of file QmitkToFPointSetWidget.cpp.
References mitk::VtkLayerController::GetInstance(), mitk::RenderingManager::GetInstance(), m_Controls, m_ForegroundRenderer1, m_ForegroundRenderer2, m_ForegroundRenderer3, m_MeasurementPointSet2D, m_MeasurementPointSetChangedObserverTag, m_PointSet2D, m_PointSetChangedObserverTag, m_RenderWindow1, m_RenderWindow2, m_RenderWindow3, OnMeasurement(), OnPointSet(), mitk::VtkLayerController::RemoveRenderer(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by ~QmitkToFPointSetWidget().
|
virtual |
Definition at line 68 of file QmitkToFPointSetWidget.cpp.
References m_Controls, OnMeasurement(), and OnPointSet().
Referenced by CreateQtPartControl().
|
virtual |
Definition at line 56 of file QmitkToFPointSetWidget.cpp.
References CreateConnections(), and m_Controls.
Referenced by QmitkToFPointSetWidget().
void QmitkToFPointSetWidget::InitializeWidget | ( | QHash< QString, QmitkRenderWindow * > | renderWindowHashMap, |
mitk::DataStorage::Pointer | dataStorage, | ||
mitk::CameraIntrinsics::Pointer | cameraIntrinsics = NULL |
||
) |
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.
stdMultiWidget | QmitkStdMultiWidget used for painting overlays for measurement |
dataStorage | DataStorage to add PointSets |
distanceImage | range image used to calculate 3D PointSet from 2D index |
Definition at line 77 of file QmitkToFPointSetWidget.cpp.
References mitk::VtkLayerController::GetInstance(), mitk::VtkLayerController::InsertForegroundRenderer(), m_CameraIntrinsics, m_Controls, m_DataStorage, m_ForegroundRenderer1, m_ForegroundRenderer2, m_ForegroundRenderer3, m_MeasurementPointSet2D, m_MeasurementPointSet3DNode, m_MeasurementPointSetChangedObserverTag, m_MeasurementPointSetInteractor, m_PointSet2D, m_PointSet3DNode, m_PointSetChangedObserverTag, m_PointSetInteractor, m_RenderWindow1, m_RenderWindow2, m_RenderWindow3, m_RenderWindow4, m_VtkTextActor, m_WindowHeight, MeasurementPointSetChanged(), mitk::New(), mitk::PointSetDataInteractor::New(), mitk::DataNode::New(), mitk::PointSet::New(), and PointSetChanged().
|
protected |
function called when the 2D measurement PointSet has changed
Definition at line 341 of file QmitkToFPointSetWidget.cpp.
References m_CameraIntrinsics, m_DistanceImage, m_MeasurementPointSet2D, m_MeasurementPointSet3DNode, m_VtkTextActor, m_WindowHeight, mitk::ToFDistanceImageToPointSetFilter::New(), and mitk::PointSet::New().
Referenced by InitializeWidget(), and OnMeasurement().
|
protectedslot |
Activates the interactor for the measurement point set.
Definition at line 273 of file QmitkToFPointSetWidget.cpp.
References m_Controls, m_DataStorage, m_MeasurementPointSetInteractor, m_PointSetInteractor, m_VtkTextActor, and MeasurementPointSetChanged().
Referenced by CleanUpWidget(), and CreateConnections().
|
protectedslot |
Activates the interactor for the point set.
Definition at line 307 of file QmitkToFPointSetWidget.cpp.
References m_Controls, m_DataStorage, m_MeasurementPointSetInteractor, m_PointSetInteractor, m_VtkTextActor, and PointSetChanged().
Referenced by CleanUpWidget(), and CreateConnections().
|
protected |
function called when the 2D PointSet has changed
Definition at line 395 of file QmitkToFPointSetWidget.cpp.
References m_CameraIntrinsics, m_DistanceImage, m_PointSet2D, m_PointSet3DNode, m_VtkTextActor, mitk::ToFDistanceImageToPointSetFilter::New(), and mitk::PointSet::New().
Referenced by InitializeWidget(), and OnPointSet().
void QmitkToFPointSetWidget::SetCameraIntrinsics | ( | mitk::CameraIntrinsics::Pointer | cameraIntrinsics | ) |
Set intrinsic parameters of the used device.
Definition at line 268 of file QmitkToFPointSetWidget.cpp.
References m_CameraIntrinsics.
void QmitkToFPointSetWidget::SetDistanceImage | ( | mitk::Image::Pointer | distanceImage | ) |
set the image holding the distance information used for measuring
Definition at line 253 of file QmitkToFPointSetWidget.cpp.
References m_DistanceImage.
|
protected |
intrinsic parameters of the camera
Definition at line 119 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), MeasurementPointSetChanged(), PointSetChanged(), and SetCameraIntrinsics().
|
protected |
member holding the UI elements of this widget
Definition at line 114 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), CreateConnections(), CreateQtPartControl(), InitializeWidget(), OnMeasurement(), OnPointSet(), and QmitkToFPointSetWidget().
|
protected |
member holding the set DataStorage
Definition at line 116 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), OnMeasurement(), and OnPointSet().
|
protected |
image holding the range data of the ToF camera
Definition at line 118 of file QmitkToFPointSetWidget.h.
Referenced by MeasurementPointSetChanged(), PointSetChanged(), and SetDistanceImage().
|
protected |
renderer responsible for text rendering in the foreground of widget 1
Definition at line 122 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
renderer responsible for text rendering in the foreground of widget 2
Definition at line 123 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
renderer responsible for text rendering in the foreground of widget 3
Definition at line 124 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
PointSet holding the 2D ToF image point selection used for measuring.
Definition at line 130 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), InitializeWidget(), and MeasurementPointSetChanged().
|
protected |
DataNode holding the 3D ToF coordinates used for measuring.
Definition at line 131 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), and MeasurementPointSetChanged().
|
protected |
observer tag for measurement PointSet observer
Definition at line 138 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
PointSetInteractor used for measurement.
Definition at line 136 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), OnMeasurement(), and OnPointSet().
|
protected |
PointSet holding the 2D ToF image points.
Definition at line 132 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), InitializeWidget(), and PointSetChanged().
|
protected |
DataNode holding the 3D ToF coordinates.
Definition at line 133 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), and PointSetChanged().
|
protected |
observer tag for PointSet observer
Definition at line 139 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
PointSetInteractor used for PointSet definition.
Definition at line 135 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), OnMeasurement(), and OnPointSet().
|
protected |
vtk render window used for showing overlay in widget 1
Definition at line 125 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
vtk render window used for showing overlay in widget 2
Definition at line 126 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
vtk render window used for showing overlay in widget 3
Definition at line 127 of file QmitkToFPointSetWidget.h.
Referenced by CleanUpWidget(), and InitializeWidget().
|
protected |
vtk render window used for showing overlay in widget 3
Definition at line 128 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget().
|
protected |
actor containing the text of the overlay
Definition at line 121 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), MeasurementPointSetChanged(), OnMeasurement(), OnPointSet(), and PointSetChanged().
|
protected |
Height of the renderWindow.
Definition at line 142 of file QmitkToFPointSetWidget.h.
Referenced by InitializeWidget(), and MeasurementPointSetChanged().
|
static |
Definition at line 59 of file QmitkToFPointSetWidget.h.