Medical Imaging Interaction Toolkit  2018.4.99-18ddd2ed
Medical Imaging Interaction Toolkit
QmitkNDIConfigurationWidget Class Reference

#include <QmitkNDIConfigurationWidget.h>

Inheritance diagram for QmitkNDIConfigurationWidget:
Collaboration diagram for QmitkNDIConfigurationWidget:

Public Slots

void SetDeviceName (const char *dev)
 set the device name (e.g. "COM1", "/dev/ttyS0") that will be used to connect to the tracking device More...
 
void ShowToolRepresentationColumn ()
 show or hide the tooltable column "Tool Representation". This SLOT should be called after SIGNAL "Connected" is emitted More...
 
void EnableAddToolsButton (bool enable)
 enables or disables the Add Tools button More...
 
void EnableDiscoverNewToolsButton (bool enable)
 

Signals

void ToolsAdded (QStringList tools)
 
void ToolsChanged ()
 
void Connected ()
 
void Disconnected ()
 
void RepresentationChanged (int row, mitk::Surface::Pointer surface)
 
void SignalToolNameChanged (int id, QString name)
 
void SignalSavedTool (int id, QString surfaceFilename)
 
void SignalLoadTool (int id, mitk::DataNode::Pointer dn)
 

Public Member Functions

 QmitkNDIConfigurationWidget (QWidget *parent)
 
 ~QmitkNDIConfigurationWidget () override
 
std::string GetDeviceName () const
 
mitk::NDITrackingDeviceGetTracker () const
 
mitk::DataStorageGetDataStorage () const
 
mitk::NodePredicateBaseGetPredicate () const
 
const QStringList & GetToolTypes () const
 
void SetToolTypes (const QStringList &types)
 set types list for type editor combobox More...
 
void SetDataStorage (mitk::DataStorage *ds)
 set datastorage for organ node editor More...
 
void SetPredicate (mitk::NodePredicateBase::Pointer p)
 set predicate for organ node editor More...
 
void SetTagPropertyName (const std::string &name)
 set name of the property that is used to tag selected nodes More...
 
void SetTagProperty (mitk::BaseProperty::Pointer prop)
 set the property that is used to tag selected nodes More...
 
const QString GetToolType (unsigned int index) const
 
const QString GetToolName (unsigned int index) const
 
QMap< QString, unsigned int > GetToolAndTypes () const
 
QList< unsigned int > GetToolsByToolType (QString toolType) const
 
mitk::DataNodeGetNode (unsigned int index) const
 

Protected Types

typedef QMap< QString, mitk::TrackingDeviceTypePortDeviceMap
 

Protected Slots

void OnConnect ()
 enables or disables the Discover new Tools button More...
 
void OnDisconnect ()
 
void OnDiscoverTools ()
 
void OnDiscoverDevices ()
 
void OnAddPassiveTool ()
 
void UpdateTrackerFromToolTable (const QModelIndex &topLeft, const QModelIndex &)
 
void OnTableItemClicked (const QModelIndex &topLeft)
 for clicking on tooltable items More...
 
void OnDisoverDevicesBtnInfo ()
 
void OnTableCellChanged (int row, int column)
 
void OnSaveTool ()
 
void OnLoadTool ()
 

Protected Member Functions

void ScanPortsForNDITrackingDevices (PortDeviceMap &portsAndDevices)
 scans the ports provided as key in the portsAndDevices and fills the respective value of portsAndDevices with the tracking device type at that port More...
 
mitk::TrackingDeviceType ScanPort (QString port)
 
mitk::NavigationTool::Pointer GenerateNavigationTool (mitk::TrackingTool *tool)
 
QStringList GetToolNamesList ()
 returns a string list with the names of all tools of the current tracking device More...
 
void CreateTracker ()
 creates new NDITrackingDevice object More...
 
void SetupTracker ()
 sets the parameters from the gui to the tracking device object More...
 
QString GetStatusText ()
 construct a status text depending on the current state of the tracking device object More...
 
void UpdateWidgets ()
 
void UpdateToolTable ()
 read all tools from the tracking device object and display them in the gui More...
 
virtual void CreateQtPartControl (QWidget *parent)
 
virtual void CreateConnections ()
 Creation of the connections of main and control widget. More...
 
void HidePolarisOptionsGroupbox (bool on)
 show or hide polaris options in the UI More...
 
void HideAuroraOptionsGroupbox (bool on)
 show or hide aurora options in the UI More...
 
mitk::Surface::Pointer LoadSurfaceFromSTLFile (QString surfaceFilename)
 

Protected Attributes

Ui::QmitkNDIConfigurationWidget * m_Controls
 gui widgets More...
 
mitk::NDITrackingDevice::Pointer m_Tracker
 tracking device object More...
 
mitk::TrackingDeviceSource::Pointer m_Source
 
QmitkNDIToolDelegatem_Delegate
 
QString m_SROMCellDefaultText
 
QString m_RepresentatonCellDefaultText
 

Detailed Description

Deprecated:
This widget is deprecated. The features (1) connection to NDI tracking devices and (2) handling of navigation tools are available in the pluging org.mitk.gui.qt.igttracking in a current version. The new concept to access the tracking devices is to use microservices. This can be achieved very simple by using the QmitkNavigationDataSourceSelectionWidget. You can find an example in the IGT tutorial step 2 / org.mitk.gui.qt.igtexamples (view TrackingLab).

Definition at line 39 of file QmitkNDIConfigurationWidget.h.

Member Typedef Documentation

◆ PortDeviceMap

Definition at line 95 of file QmitkNDIConfigurationWidget.h.

Constructor & Destructor Documentation

◆ QmitkNDIConfigurationWidget()

QmitkNDIConfigurationWidget::QmitkNDIConfigurationWidget ( QWidget *  parent)

Definition at line 38 of file QmitkNDIConfigurationWidget.cpp.

References CreateQtPartControl().

◆ ~QmitkNDIConfigurationWidget()

QmitkNDIConfigurationWidget::~QmitkNDIConfigurationWidget ( )
override

Definition at line 46 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, m_Source, and m_Tracker.

Member Function Documentation

◆ Connected

void QmitkNDIConfigurationWidget::Connected ( )
signal

Referenced by OnConnect().

◆ CreateConnections()

void QmitkNDIConfigurationWidget::CreateConnections ( )
protectedvirtual

◆ CreateQtPartControl()

◆ CreateTracker()

void QmitkNDIConfigurationWidget::CreateTracker ( )
protected

creates new NDITrackingDevice object

Definition at line 260 of file QmitkNDIConfigurationWidget.cpp.

References m_Tracker, and mitk::NDITrackingDevice::New().

Referenced by OnAddPassiveTool(), and OnConnect().

◆ Disconnected

void QmitkNDIConfigurationWidget::Disconnected ( )
signal

Referenced by OnDisconnect().

◆ EnableAddToolsButton

void QmitkNDIConfigurationWidget::EnableAddToolsButton ( bool  enable)
slot

enables or disables the Add Tools button

Definition at line 885 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

◆ EnableDiscoverNewToolsButton

void QmitkNDIConfigurationWidget::EnableDiscoverNewToolsButton ( bool  enable)
slot

Definition at line 889 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

◆ GenerateNavigationTool()

◆ GetDataStorage()

mitk::DataStorage* QmitkNDIConfigurationWidget::GetDataStorage ( ) const

◆ GetDeviceName()

std::string QmitkNDIConfigurationWidget::GetDeviceName ( ) const

Definition at line 275 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

Referenced by SetupTracker().

◆ GetNode()

mitk::DataNode * QmitkNDIConfigurationWidget::GetNode ( unsigned int  index) const

◆ GetPredicate()

mitk::NodePredicateBase* QmitkNDIConfigurationWidget::GetPredicate ( ) const

◆ GetStatusText()

QString QmitkNDIConfigurationWidget::GetStatusText ( )
protected

construct a status text depending on the current state of the tracking device object

Definition at line 205 of file QmitkNDIConfigurationWidget.cpp.

References m_Tracker, mitk::TrackingDevice::Ready, and mitk::TrackingDevice::Tracking.

Referenced by UpdateWidgets().

◆ GetToolAndTypes()

QMap< QString, unsigned int > QmitkNDIConfigurationWidget::GetToolAndTypes ( ) const

◆ GetToolName()

const QString QmitkNDIConfigurationWidget::GetToolName ( unsigned int  index) const

Definition at line 575 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::NameCol.

◆ GetToolNamesList()

QStringList QmitkNDIConfigurationWidget::GetToolNamesList ( )
protected

returns a string list with the names of all tools of the current tracking device

Definition at line 435 of file QmitkNDIConfigurationWidget.cpp.

References mitk::TrackingTool::GetToolName(), and m_Tracker.

Referenced by OnAddPassiveTool(), OnConnect(), OnDisconnect(), and OnDiscoverTools().

◆ GetToolsByToolType()

QList< unsigned int > QmitkNDIConfigurationWidget::GetToolsByToolType ( QString  toolType) const

◆ GetToolType()

const QString QmitkNDIConfigurationWidget::GetToolType ( unsigned int  index) const

Definition at line 561 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::TypeCol.

◆ GetToolTypes()

const QStringList& QmitkNDIConfigurationWidget::GetToolTypes ( ) const

◆ GetTracker()

mitk::NDITrackingDevice * QmitkNDIConfigurationWidget::GetTracker ( ) const

Definition at line 451 of file QmitkNDIConfigurationWidget.cpp.

References m_Tracker.

◆ HideAuroraOptionsGroupbox()

void QmitkNDIConfigurationWidget::HideAuroraOptionsGroupbox ( bool  on)
protected

show or hide aurora options in the UI

Definition at line 641 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

Referenced by CreateQtPartControl(), OnConnect(), and OnDisconnect().

◆ HidePolarisOptionsGroupbox()

void QmitkNDIConfigurationWidget::HidePolarisOptionsGroupbox ( bool  on)
protected

show or hide polaris options in the UI

Definition at line 636 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

Referenced by CreateQtPartControl(), OnConnect(), and OnDisconnect().

◆ LoadSurfaceFromSTLFile()

mitk::Surface::Pointer QmitkNDIConfigurationWidget::LoadSurfaceFromSTLFile ( QString  surfaceFilename)
protected

Definition at line 864 of file QmitkNDIConfigurationWidget.cpp.

References MBI_ERROR.

Referenced by GenerateNavigationTool(), and OnTableItemClicked().

◆ OnAddPassiveTool

◆ OnConnect

◆ OnDisconnect

void QmitkNDIConfigurationWidget::OnDisconnect ( )
protectedslot

◆ OnDiscoverDevices

void QmitkNDIConfigurationWidget::OnDiscoverDevices ( )
protectedslot

◆ OnDiscoverTools

void QmitkNDIConfigurationWidget::OnDiscoverTools ( )
protectedslot

◆ OnDisoverDevicesBtnInfo

void QmitkNDIConfigurationWidget::OnDisoverDevicesBtnInfo ( )
protectedslot

Definition at line 677 of file QmitkNDIConfigurationWidget.cpp.

Referenced by CreateConnections().

◆ OnLoadTool

◆ OnSaveTool

void QmitkNDIConfigurationWidget::OnSaveTool ( )
protectedslot

◆ OnTableCellChanged

void QmitkNDIConfigurationWidget::OnTableCellChanged ( int  row,
int  column 
)
protectedslot

◆ OnTableItemClicked

void QmitkNDIConfigurationWidget::OnTableItemClicked ( const QModelIndex &  topLeft)
protectedslot

◆ RepresentationChanged

void QmitkNDIConfigurationWidget::RepresentationChanged ( int  row,
mitk::Surface::Pointer  surface 
)
signal

Referenced by OnTableItemClicked().

◆ ScanPort()

mitk::TrackingDeviceType QmitkNDIConfigurationWidget::ScanPort ( QString  port)
protected

◆ ScanPortsForNDITrackingDevices()

void QmitkNDIConfigurationWidget::ScanPortsForNDITrackingDevices ( PortDeviceMap portsAndDevices)
protected

scans the ports provided as key in the portsAndDevices and fills the respective value of portsAndDevices with the tracking device type at that port

Documentation

Parameters
[in]portsAndDeviceskeys are used to query serial ports
[out]portsAndDevicesvalues of the existing keys will be filled with the tracking device type

Definition at line 423 of file QmitkNDIConfigurationWidget.cpp.

References ScanPort().

Referenced by OnDiscoverDevices().

◆ SetDataStorage()

void QmitkNDIConfigurationWidget::SetDataStorage ( mitk::DataStorage ds)

set datastorage for organ node editor

Definition at line 463 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetDataStorage().

◆ SetDeviceName

void QmitkNDIConfigurationWidget::SetDeviceName ( const char *  dev)
slot

set the device name (e.g. "COM1", "/dev/ttyS0") that will be used to connect to the tracking device

Definition at line 287 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

◆ SetPredicate()

void QmitkNDIConfigurationWidget::SetPredicate ( mitk::NodePredicateBase::Pointer  p)

set predicate for organ node editor

Definition at line 469 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetPredicate().

◆ SetTagProperty()

void QmitkNDIConfigurationWidget::SetTagProperty ( mitk::BaseProperty::Pointer  prop)

set the property that is used to tag selected nodes

Definition at line 481 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTagProperty().

◆ SetTagPropertyName()

void QmitkNDIConfigurationWidget::SetTagPropertyName ( const std::string &  name)

set name of the property that is used to tag selected nodes

Definition at line 475 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTagPropertyName().

◆ SetToolTypes()

void QmitkNDIConfigurationWidget::SetToolTypes ( const QStringList &  types)

set types list for type editor combobox

Definition at line 457 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTypes().

◆ SetupTracker()

void QmitkNDIConfigurationWidget::SetupTracker ( )
protected

sets the parameters from the gui to the tracking device object

Definition at line 266 of file QmitkNDIConfigurationWidget.cpp.

References mitk::SerialCommunication::BaudRate115200, GetDeviceName(), and m_Tracker.

Referenced by OnConnect().

◆ ShowToolRepresentationColumn

void QmitkNDIConfigurationWidget::ShowToolRepresentationColumn ( )
slot

show or hide the tooltable column "Tool Representation". This SLOT should be called after SIGNAL "Connected" is emitted

Definition at line 646 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::RepCol.

◆ SignalLoadTool

void QmitkNDIConfigurationWidget::SignalLoadTool ( int  id,
mitk::DataNode::Pointer  dn 
)
signal

Referenced by OnLoadTool().

◆ SignalSavedTool

void QmitkNDIConfigurationWidget::SignalSavedTool ( int  id,
QString  surfaceFilename 
)
signal

Referenced by OnSaveTool().

◆ SignalToolNameChanged

void QmitkNDIConfigurationWidget::SignalToolNameChanged ( int  id,
QString  name 
)
signal

Referenced by OnTableCellChanged().

◆ ToolsAdded

void QmitkNDIConfigurationWidget::ToolsAdded ( QStringList  tools)
signal

◆ ToolsChanged

void QmitkNDIConfigurationWidget::ToolsChanged ( )
signal

◆ UpdateToolTable()

◆ UpdateTrackerFromToolTable

void QmitkNDIConfigurationWidget::UpdateTrackerFromToolTable ( const QModelIndex &  topLeft,
const QModelIndex &   
)
protectedslot

◆ UpdateWidgets()

void QmitkNDIConfigurationWidget::UpdateWidgets ( )
protected

Member Data Documentation

◆ m_Controls

◆ m_Delegate

QmitkNDIToolDelegate* QmitkNDIConfigurationWidget::m_Delegate
protected

◆ m_RepresentatonCellDefaultText

QString QmitkNDIConfigurationWidget::m_RepresentatonCellDefaultText
protected

Definition at line 126 of file QmitkNDIConfigurationWidget.h.

Referenced by OnLoadTool(), and UpdateToolTable().

◆ m_Source

mitk::TrackingDeviceSource::Pointer QmitkNDIConfigurationWidget::m_Source
protected

Definition at line 122 of file QmitkNDIConfigurationWidget.h.

Referenced by ~QmitkNDIConfigurationWidget().

◆ m_SROMCellDefaultText

QString QmitkNDIConfigurationWidget::m_SROMCellDefaultText
protected

Definition at line 125 of file QmitkNDIConfigurationWidget.h.

Referenced by UpdateToolTable().

◆ m_Tracker


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