Medical Imaging Interaction Toolkit  2016.11.0
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)
 
virtual ~QmitkNDIConfigurationWidget ()
 
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 43 of file QmitkNDIConfigurationWidget.h.

Member Typedef Documentation

Definition at line 99 of file QmitkNDIConfigurationWidget.h.

Constructor & Destructor Documentation

QmitkNDIConfigurationWidget::QmitkNDIConfigurationWidget ( QWidget *  parent)

Definition at line 39 of file QmitkNDIConfigurationWidget.cpp.

References CreateQtPartControl().

QmitkNDIConfigurationWidget::~QmitkNDIConfigurationWidget ( )
virtual

Definition at line 47 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, m_Source, and m_Tracker.

Member Function Documentation

void QmitkNDIConfigurationWidget::Connected ( )
signal

Referenced by OnConnect().

void QmitkNDIConfigurationWidget::CreateConnections ( )
protectedvirtual
void QmitkNDIConfigurationWidget::CreateTracker ( )
protected

creates new NDITrackingDevice object

Definition at line 258 of file QmitkNDIConfigurationWidget.cpp.

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

Referenced by OnAddPassiveTool(), and OnConnect().

void QmitkNDIConfigurationWidget::Disconnected ( )
signal

Referenced by OnDisconnect().

void QmitkNDIConfigurationWidget::EnableAddToolsButton ( bool  enable)
slot

enables or disables the Add Tools button

Definition at line 880 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

void QmitkNDIConfigurationWidget::EnableDiscoverNewToolsButton ( bool  enable)
slot

Definition at line 884 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

mitk::DataStorage* QmitkNDIConfigurationWidget::GetDataStorage ( ) const
std::string QmitkNDIConfigurationWidget::GetDeviceName ( ) const

Definition at line 273 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

Referenced by SetupTracker().

mitk::DataNode * QmitkNDIConfigurationWidget::GetNode ( unsigned int  index) const
mitk::NodePredicateBase* QmitkNDIConfigurationWidget::GetPredicate ( ) const
QString QmitkNDIConfigurationWidget::GetStatusText ( )
protected

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

Definition at line 206 of file QmitkNDIConfigurationWidget.cpp.

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

Referenced by UpdateWidgets().

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

Definition at line 572 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::NameCol.

QStringList QmitkNDIConfigurationWidget::GetToolNamesList ( )
protected

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

Definition at line 433 of file QmitkNDIConfigurationWidget.cpp.

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

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

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

Definition at line 558 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::TypeCol.

const QStringList& QmitkNDIConfigurationWidget::GetToolTypes ( ) const
mitk::NDITrackingDevice * QmitkNDIConfigurationWidget::GetTracker ( ) const

Definition at line 449 of file QmitkNDIConfigurationWidget.cpp.

References m_Tracker.

void QmitkNDIConfigurationWidget::HideAuroraOptionsGroupbox ( bool  on)
protected

show or hide aurora options in the UI

Definition at line 638 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

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

void QmitkNDIConfigurationWidget::HidePolarisOptionsGroupbox ( bool  on)
protected

show or hide polaris options in the UI

Definition at line 633 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

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

mitk::Surface::Pointer QmitkNDIConfigurationWidget::LoadSurfaceFromSTLFile ( QString  surfaceFilename)
protected
void QmitkNDIConfigurationWidget::OnAddPassiveTool ( )
protectedslot
void QmitkNDIConfigurationWidget::OnDisconnect ( )
protectedslot
void QmitkNDIConfigurationWidget::OnDiscoverDevices ( )
protectedslot
void QmitkNDIConfigurationWidget::OnDiscoverTools ( )
protectedslot
void QmitkNDIConfigurationWidget::OnDisoverDevicesBtnInfo ( )
protectedslot

Definition at line 674 of file QmitkNDIConfigurationWidget.cpp.

Referenced by CreateConnections().

void QmitkNDIConfigurationWidget::OnSaveTool ( )
protectedslot
void QmitkNDIConfigurationWidget::OnTableCellChanged ( int  row,
int  column 
)
protectedslot
void QmitkNDIConfigurationWidget::OnTableItemClicked ( const QModelIndex &  topLeft)
protectedslot

for clicking on tooltable items

Definition at line 485 of file QmitkNDIConfigurationWidget.cpp.

References filename, LoadSurfaceFromSTLFile(), m_Controls, QmitkNDIToolDelegate::RepCol, and RepresentationChanged().

Referenced by UpdateToolTable().

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

Referenced by OnTableItemClicked().

mitk::TrackingDeviceType QmitkNDIConfigurationWidget::ScanPort ( QString  port)
protected
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 421 of file QmitkNDIConfigurationWidget.cpp.

References ScanPort().

Referenced by OnDiscoverDevices().

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

set datastorage for organ node editor

Definition at line 461 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetDataStorage().

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 285 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls.

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

set predicate for organ node editor

Definition at line 467 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetPredicate().

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

set the property that is used to tag selected nodes

Definition at line 479 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTagProperty().

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

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

Definition at line 473 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTagPropertyName().

void QmitkNDIConfigurationWidget::SetToolTypes ( const QStringList &  types)

set types list for type editor combobox

Definition at line 455 of file QmitkNDIConfigurationWidget.cpp.

References m_Delegate, and QmitkNDIToolDelegate::SetTypes().

void QmitkNDIConfigurationWidget::SetupTracker ( )
protected

sets the parameters from the gui to the tracking device object

Definition at line 264 of file QmitkNDIConfigurationWidget.cpp.

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

Referenced by OnConnect().

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 643 of file QmitkNDIConfigurationWidget.cpp.

References m_Controls, and QmitkNDIToolDelegate::RepCol.

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

Referenced by OnLoadTool().

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

Referenced by OnSaveTool().

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

Referenced by OnTableCellChanged().

void QmitkNDIConfigurationWidget::ToolsAdded ( QStringList  tools)
signal
void QmitkNDIConfigurationWidget::ToolsChanged ( )
signal
void QmitkNDIConfigurationWidget::UpdateTrackerFromToolTable ( const QModelIndex &  topLeft,
const QModelIndex &   
)
protectedslot
void QmitkNDIConfigurationWidget::UpdateWidgets ( )
protected

Member Data Documentation

QmitkNDIToolDelegate* QmitkNDIConfigurationWidget::m_Delegate
protected
QString QmitkNDIConfigurationWidget::m_RepresentatonCellDefaultText
protected

Definition at line 130 of file QmitkNDIConfigurationWidget.h.

Referenced by OnLoadTool(), and UpdateToolTable().

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

Definition at line 126 of file QmitkNDIConfigurationWidget.h.

Referenced by ~QmitkNDIConfigurationWidget().

QString QmitkNDIConfigurationWidget::m_SROMCellDefaultText
protected

Definition at line 129 of file QmitkNDIConfigurationWidget.h.

Referenced by UpdateToolTable().


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