Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
Medical Imaging Interaction Toolkit
QmitkNavigationToolCreationWidget Class Reference

An object of this class offers an UI to create or modify NavigationTools. More...

#include <QmitkNavigationToolCreationWidget.h>

Inheritance diagram for QmitkNavigationToolCreationWidget:
Collaboration diagram for QmitkNavigationToolCreationWidget:

Signals

void NavigationToolFinished ()
 This signal is emitted if the user finished the creation of the tool. More...
 
void Canceled ()
 This signal is emitted if the user canceled the creation of the tool. More...
 

Public Member Functions

void Initialize (mitk::DataStorage *dataStorage, const std::string &supposedIdentifier, const std::string &supposedName="NewTool")
 Initializes the widget. More...
 
void ShowToolPreview (std::string _name)
 This Function will add a new node to the Data Manager with given name to enable a preview of the m_ToolToBeEdited. More...
 
void SetTrackingDeviceType (mitk::TrackingDeviceType type, bool changeable=true)
 Sets the default tracking device type. You may also define if it is changeable or not. More...
 
 QmitkNavigationToolCreationWidget (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
 
 ~QmitkNavigationToolCreationWidget () override
 
void SetDefaultData (mitk::NavigationTool::Pointer DefaultTool)
 Sets the default data of all input fields. The default data is used from the default tool which is given as parameter. More...
 
mitk::NavigationTool::Pointer GetCreatedTool ()
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnLoadCalibrationFile ()
 
void OnSurfaceUseToggled ()
 
void OnLoadSurface ()
 
void OnEditToolTip ()
 
void OnEditToolTipFinished (mitk::AffineTransform3D::Pointer toolTip)
 
void OnCancel ()
 
void OnFinished ()
 
void GetValuesFromGuiElements ()
 

Protected Member Functions

virtual void CreateConnections ()
 Creation of the connections. More...
 
virtual void CreateQtPartControl (QWidget *parent)
 

Protected Attributes

Ui::QmitkNavigationToolCreationWidgetControls * m_Controls
 
mitk::NavigationTool::Pointer m_ToolToBeEdited
 this pointer holds the tool which is edited. If finished is clicked, it will be copied to the final tool, if it is cancled, it is reseted and not used. This can be regarded as the clipboard for all changes. More...
 
mitk::NavigationTool::Pointer m_FinalTool
 this pointer holds the tool which is created and returned More...
 
QmitkInteractiveTransformationWidgetm_ToolTransformationWidget
 
mitk::DataStoragem_DataStorage
 holds the DataStorage More...
 
mitk::DataNode::Pointer m_calLandmarkNode
 
mitk::DataNode::Pointer m_regLandmarkNode
 

Detailed Description

An object of this class offers an UI to create or modify NavigationTools.

Documentation: Be sure to call the initialize method before you start the widget otherwise some errors might occure.

Definition at line 45 of file QmitkNavigationToolCreationWidget.h.

Constructor & Destructor Documentation

◆ QmitkNavigationToolCreationWidget()

QmitkNavigationToolCreationWidget::QmitkNavigationToolCreationWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr 
)

◆ ~QmitkNavigationToolCreationWidget()

QmitkNavigationToolCreationWidget::~QmitkNavigationToolCreationWidget ( )
override

Definition at line 61 of file QmitkNavigationToolCreationWidget.cpp.

References m_Controls, and m_ToolTransformationWidget.

Member Function Documentation

◆ Canceled

void QmitkNavigationToolCreationWidget::Canceled ( )
signal

This signal is emitted if the user canceled the creation of the tool.

Referenced by OnCancel().

◆ CreateConnections()

void QmitkNavigationToolCreationWidget::CreateConnections ( )
protectedvirtual

◆ CreateQtPartControl()

void QmitkNavigationToolCreationWidget::CreateQtPartControl ( QWidget *  parent)
protectedvirtual

Definition at line 68 of file QmitkNavigationToolCreationWidget.cpp.

References m_Controls.

Referenced by QmitkNavigationToolCreationWidget().

◆ GetCreatedTool()

mitk::NavigationTool::Pointer QmitkNavigationToolCreationWidget::GetCreatedTool ( )
Returns
Returns the created tool. Returns nullptr if no tool was created yet.

Definition at line 272 of file QmitkNavigationToolCreationWidget.cpp.

References m_FinalTool.

◆ GetValuesFromGuiElements

void QmitkNavigationToolCreationWidget::GetValuesFromGuiElements ( )
protectedslot

◆ Initialize()

void QmitkNavigationToolCreationWidget::Initialize ( mitk::DataStorage dataStorage,
const std::string &  supposedIdentifier,
const std::string &  supposedName = "NewTool" 
)

Initializes the widget.

Parameters
dataStorageThe data storage is needed to offer the possibility to choose surfaces from the data storage for tool visualization.
supposedIdentifierThis Identifier is supposed for the user. It is needed because every identifier in a navigation tool storage must be unique and we don't know the others.

Definition at line 106 of file QmitkNavigationToolCreationWidget.cpp.

References m_Controls, m_DataStorage, m_ToolToBeEdited, mitk::NodePredicateDataType::New(), mitk::NavigationTool::New(), and SetDefaultData().

Referenced by OnCancel(), and QmitkNavigationToolCreationWidget().

◆ NavigationToolFinished

void QmitkNavigationToolCreationWidget::NavigationToolFinished ( )
signal

This signal is emitted if the user finished the creation of the tool.

Referenced by OnFinished().

◆ OnCancel

void QmitkNavigationToolCreationWidget::OnCancel ( )
protectedslot

Definition at line 290 of file QmitkNavigationToolCreationWidget.cpp.

References Canceled(), and Initialize().

Referenced by CreateConnections().

◆ OnEditToolTip

◆ OnEditToolTipFinished

void QmitkNavigationToolCreationWidget::OnEditToolTipFinished ( mitk::AffineTransform3D::Pointer  toolTip)
protectedslot

◆ OnFinished

void QmitkNavigationToolCreationWidget::OnFinished ( )
protectedslot

◆ OnLoadCalibrationFile

void QmitkNavigationToolCreationWidget::OnLoadCalibrationFile ( )
protectedslot

◆ OnLoadSurface

◆ OnSurfaceUseToggled

void QmitkNavigationToolCreationWidget::OnSurfaceUseToggled ( )
protectedslot

◆ SetDefaultData()

void QmitkNavigationToolCreationWidget::SetDefaultData ( mitk::NavigationTool::Pointer  DefaultTool)

Sets the default data of all input fields. The default data is used from the default tool which is given as parameter.

Definition at line 136 of file QmitkNavigationToolCreationWidget.cpp.

References mitk::NavigationTool::Fiducial, mitk::NavigationTool::Instrument, m_Controls, m_ToolToBeEdited, mitk::NavigationTool::Skinmarker, and mitk::NavigationTool::Unknown.

Referenced by Initialize().

◆ SetTrackingDeviceType()

void QmitkNavigationToolCreationWidget::SetTrackingDeviceType ( mitk::TrackingDeviceType  type,
bool  changeable = true 
)

Sets the default tracking device type. You may also define if it is changeable or not.

Definition at line 296 of file QmitkNavigationToolCreationWidget.cpp.

References m_Controls, and m_ToolToBeEdited.

◆ ShowToolPreview()

void QmitkNavigationToolCreationWidget::ShowToolPreview ( std::string  _name)

This Function will add a new node to the Data Manager with given name to enable a preview of the m_ToolToBeEdited.

Definition at line 124 of file QmitkNavigationToolCreationWidget.cpp.

References mitk::DataStorage::Add(), mitk::RenderingManager::GetInstance(), mitk::RenderingManager::InitializeViewsByBoundingObjects(), m_DataStorage, m_ToolToBeEdited, and mitk::ColorProperty::New().

Member Data Documentation

◆ m_calLandmarkNode

mitk::DataNode::Pointer QmitkNavigationToolCreationWidget::m_calLandmarkNode
protected

Hold the data nodes which are needed for the landmark widgets.

Definition at line 139 of file QmitkNavigationToolCreationWidget.h.

Referenced by OnEditToolTipFinished().

◆ m_Controls

◆ m_DataStorage

mitk::DataStorage* QmitkNavigationToolCreationWidget::m_DataStorage
protected

holds the DataStorage

Definition at line 135 of file QmitkNavigationToolCreationWidget.h.

Referenced by Initialize(), OnLoadSurface(), OnSurfaceUseToggled(), and ShowToolPreview().

◆ m_FinalTool

mitk::NavigationTool::Pointer QmitkNavigationToolCreationWidget::m_FinalTool
protected

this pointer holds the tool which is created and returned

Definition at line 130 of file QmitkNavigationToolCreationWidget.h.

Referenced by GetCreatedTool(), GetValuesFromGuiElements(), OnFinished(), and QmitkNavigationToolCreationWidget().

◆ m_regLandmarkNode

mitk::DataNode::Pointer QmitkNavigationToolCreationWidget::m_regLandmarkNode
protected

Definition at line 139 of file QmitkNavigationToolCreationWidget.h.

Referenced by OnEditToolTipFinished().

◆ m_ToolToBeEdited

mitk::NavigationTool::Pointer QmitkNavigationToolCreationWidget::m_ToolToBeEdited
protected

this pointer holds the tool which is edited. If finished is clicked, it will be copied to the final tool, if it is cancled, it is reseted and not used. This can be regarded as the clipboard for all changes.

Definition at line 127 of file QmitkNavigationToolCreationWidget.h.

Referenced by GetValuesFromGuiElements(), Initialize(), OnEditToolTip(), OnEditToolTipFinished(), OnFinished(), OnLoadCalibrationFile(), OnLoadSurface(), OnSurfaceUseToggled(), QmitkNavigationToolCreationWidget(), SetDefaultData(), SetTrackingDeviceType(), and ShowToolPreview().

◆ m_ToolTransformationWidget

QmitkInteractiveTransformationWidget* QmitkNavigationToolCreationWidget::m_ToolTransformationWidget
protected

◆ VIEW_ID

const std::string QmitkNavigationToolCreationWidget::VIEW_ID
static

Definition at line 50 of file QmitkNavigationToolCreationWidget.h.


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