Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <QmitkNDIConfigurationWidget.h>
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::NDITrackingDevice * | GetTracker () const |
mitk::DataStorage * | GetDataStorage () const |
mitk::NodePredicateBase * | GetPredicate () 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::DataNode * | GetNode (unsigned int index) const |
Protected Types | |
typedef QMap< QString, mitk::TrackingDeviceType > | PortDeviceMap |
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 |
QmitkNDIToolDelegate * | m_Delegate |
QString | m_SROMCellDefaultText |
QString | m_RepresentatonCellDefaultText |
Definition at line 43 of file QmitkNDIConfigurationWidget.h.
|
protected |
Definition at line 99 of file QmitkNDIConfigurationWidget.h.
QmitkNDIConfigurationWidget::QmitkNDIConfigurationWidget | ( | QWidget * | parent | ) |
Definition at line 39 of file QmitkNDIConfigurationWidget.cpp.
References CreateQtPartControl().
|
virtual |
Definition at line 47 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls, m_Source, and m_Tracker.
|
signal |
Referenced by OnConnect().
|
protectedvirtual |
Creation of the connections of main and control widget.
Definition at line 81 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls, OnAddPassiveTool(), OnConnect(), OnDiscoverDevices(), OnDiscoverTools(), OnDisoverDevicesBtnInfo(), OnLoadTool(), OnSaveTool(), and UpdateTrackerFromToolTable().
Referenced by CreateQtPartControl().
|
protectedvirtual |
Definition at line 55 of file QmitkNDIConfigurationWidget.cpp.
References CreateConnections(), HideAuroraOptionsGroupbox(), HidePolarisOptionsGroupbox(), m_Controls, m_Delegate, QmitkNDIToolDelegate::SetDataStorage(), QmitkNDIToolDelegate::SetPredicate(), and QmitkNDIToolDelegate::SetTypes().
Referenced by QmitkNDIConfigurationWidget().
|
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().
|
signal |
Referenced by OnDisconnect().
|
slot |
enables or disables the Add Tools button
Definition at line 880 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls.
|
slot |
Definition at line 884 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls.
|
protected |
Definition at line 796 of file QmitkNDIConfigurationWidget.cpp.
References mitk::NavigationTool::Fiducial, mitk::TrackingTool::GetToolName(), mitk::NavigationTool::Instrument, LoadSurfaceFromSTLFile(), m_Controls, MBI_ERROR, mitk::NavigationTool::New(), mitk::DataNode::New(), QmitkNDIToolDelegate::RepCol, mitk::NavigationTool::Skinmarker, QmitkNDIToolDelegate::SROMCol, QmitkNDIToolDelegate::TypeCol, and mitk::NavigationTool::Unknown.
Referenced by OnSaveTool().
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 |
Definition at line 623 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls, QmitkNDIToolDelegate::NodeCol, and QmitkNDIToolDelegate::OrganNodeRole.
mitk::NodePredicateBase* QmitkNDIConfigurationWidget::GetPredicate | ( | ) | const |
|
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 |
Definition at line 586 of file QmitkNDIConfigurationWidget.cpp.
References QmitkNDIToolDelegate::IndexCol, m_Controls, mitk::ImageMappingHelper::map(), and QmitkNDIToolDelegate::TypeCol.
const QString QmitkNDIConfigurationWidget::GetToolName | ( | unsigned int | index | ) | const |
Definition at line 572 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls, and QmitkNDIToolDelegate::NameCol.
|
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 |
Definition at line 604 of file QmitkNDIConfigurationWidget.cpp.
References QmitkNDIToolDelegate::IndexCol, m_Controls, and QmitkNDIToolDelegate::TypeCol.
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.
|
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().
|
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().
|
protected |
Definition at line 859 of file QmitkNDIConfigurationWidget.cpp.
References mitk::IOUtil::LoadSurface(), and MBI_ERROR.
Referenced by GenerateNavigationTool(), and OnTableItemClicked().
|
protectedslot |
Definition at line 234 of file QmitkNDIConfigurationWidget.cpp.
References CreateTracker(), GetToolNamesList(), m_Tracker, ToolsAdded(), and UpdateToolTable().
Referenced by CreateConnections().
|
protectedslot |
enables or disables the Discover new Tools button
Definition at line 96 of file QmitkNDIConfigurationWidget.cpp.
References Connected(), CreateTracker(), GetToolNamesList(), mitk::NDIPolarisTypeInformation::GetTrackingDeviceName(), mitk::NDIAuroraTypeInformation::GetTrackingDeviceName(), HideAuroraOptionsGroupbox(), HidePolarisOptionsGroupbox(), m_Controls, m_Tracker, OnTableCellChanged(), SetupTracker(), ToolsAdded(), UpdateToolTable(), and UpdateWidgets().
Referenced by CreateConnections(), and UpdateWidgets().
|
protectedslot |
Definition at line 149 of file QmitkNDIConfigurationWidget.cpp.
References Disconnected(), GetToolNamesList(), HideAuroraOptionsGroupbox(), HidePolarisOptionsGroupbox(), m_Controls, m_Tracker, OnTableCellChanged(), ToolsAdded(), UpdateToolTable(), and UpdateWidgets().
Referenced by UpdateWidgets().
|
protectedslot |
Definition at line 352 of file QmitkNDIConfigurationWidget.cpp.
References mitk::NDIPolarisTypeInformation::GetTrackingDeviceName(), mitk::NDIAuroraTypeInformation::GetTrackingDeviceName(), m_Controls, and ScanPortsForNDITrackingDevices().
Referenced by CreateConnections().
|
protectedslot |
Definition at line 221 of file QmitkNDIConfigurationWidget.cpp.
References GetToolNamesList(), m_Tracker, ToolsAdded(), and UpdateToolTable().
Referenced by CreateConnections().
|
protectedslot |
Definition at line 674 of file QmitkNDIConfigurationWidget.cpp.
Referenced by CreateConnections().
|
protectedslot |
Definition at line 744 of file QmitkNDIConfigurationWidget.cpp.
References mitk::NavigationTool::Fiducial, filename, mitk::NavigationTool::Instrument, m_Controls, m_RepresentatonCellDefaultText, m_Tracker, MBI_ERROR, QmitkNDIToolDelegate::NameCol, mitk::NavigationToolReader::New(), SignalLoadTool(), mitk::NavigationTool::Skinmarker, QmitkNDIToolDelegate::SROMCol, and QmitkNDIToolDelegate::TypeCol.
Referenced by CreateConnections().
|
protectedslot |
Definition at line 708 of file QmitkNDIConfigurationWidget.cpp.
References filename, GenerateNavigationTool(), m_Controls, m_Tracker, MBI_ERROR, mitk::NavigationToolWriter::New(), mitk::NavigationTool::New(), and SignalSavedTool().
Referenced by CreateConnections().
|
protectedslot |
Definition at line 683 of file QmitkNDIConfigurationWidget.cpp.
References m_Controls, m_Tracker, QmitkNDIToolDelegate::NameCol, and SignalToolNameChanged().
Referenced by OnConnect(), and OnDisconnect().
|
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().
|
signal |
Referenced by OnTableItemClicked().
|
protected |
Definition at line 413 of file QmitkNDIConfigurationWidget.cpp.
References mitk::NDITrackingDevice::New().
Referenced by ScanPortsForNDITrackingDevices().
|
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
[in] | portsAndDevices | keys are used to query serial ports |
[out] | portsAndDevices | values 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().
|
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().
|
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().
|
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.
|
signal |
Referenced by OnLoadTool().
|
signal |
Referenced by OnSaveTool().
|
signal |
Referenced by OnTableCellChanged().
|
signal |
Referenced by OnAddPassiveTool(), OnConnect(), OnDisconnect(), and OnDiscoverTools().
|
signal |
Referenced by UpdateTrackerFromToolTable().
|
protected |
read all tools from the tracking device object and display them in the gui
Definition at line 293 of file QmitkNDIConfigurationWidget.cpp.
References mitk::TrackingTool::GetToolName(), QmitkNDIToolDelegate::IndexCol, mitk::TrackingTool::IsEnabled(), m_Controls, m_RepresentatonCellDefaultText, m_SROMCellDefaultText, m_Tracker, QmitkNDIToolDelegate::NameCol, QmitkNDIToolDelegate::NodeCol, OnTableItemClicked(), QmitkNDIToolDelegate::RepCol, QmitkNDIToolDelegate::SROMCol, QmitkNDIToolDelegate::StatusCol, QmitkNDIToolDelegate::TypeCol, and UpdateTrackerFromToolTable().
Referenced by OnAddPassiveTool(), OnConnect(), OnDisconnect(), and OnDiscoverTools().
|
protectedslot |
Definition at line 513 of file QmitkNDIConfigurationWidget.cpp.
References QmitkNDIToolDelegate::IndexCol, mitk::NDIPassiveTool::LoadSROMFile(), m_Controls, m_Tracker, QmitkNDIToolDelegate::NameCol, mitk::InternalTrackingTool::SetToolName(), QmitkNDIToolDelegate::SROMCol, and ToolsChanged().
Referenced by CreateConnections(), and UpdateToolTable().
|
protected |
Definition at line 169 of file QmitkNDIConfigurationWidget.cpp.
References GetStatusText(), m_Controls, m_Tracker, OnConnect(), OnDisconnect(), mitk::TrackingDevice::Ready, mitk::TrackingDevice::Setup, and mitk::TrackingDevice::Tracking.
Referenced by OnConnect(), and OnDisconnect().
|
protected |
gui widgets
Definition at line 124 of file QmitkNDIConfigurationWidget.h.
Referenced by CreateConnections(), CreateQtPartControl(), EnableAddToolsButton(), EnableDiscoverNewToolsButton(), GenerateNavigationTool(), GetDeviceName(), GetNode(), GetToolAndTypes(), GetToolName(), GetToolsByToolType(), GetToolType(), HideAuroraOptionsGroupbox(), HidePolarisOptionsGroupbox(), OnConnect(), OnDisconnect(), OnDiscoverDevices(), OnLoadTool(), OnSaveTool(), OnTableCellChanged(), OnTableItemClicked(), SetDeviceName(), ShowToolRepresentationColumn(), UpdateToolTable(), UpdateTrackerFromToolTable(), UpdateWidgets(), and ~QmitkNDIConfigurationWidget().
|
protected |
Definition at line 127 of file QmitkNDIConfigurationWidget.h.
Referenced by CreateQtPartControl(), SetDataStorage(), SetPredicate(), SetTagProperty(), SetTagPropertyName(), and SetToolTypes().
|
protected |
Definition at line 130 of file QmitkNDIConfigurationWidget.h.
Referenced by OnLoadTool(), and UpdateToolTable().
|
protected |
Definition at line 126 of file QmitkNDIConfigurationWidget.h.
Referenced by ~QmitkNDIConfigurationWidget().
|
protected |
Definition at line 129 of file QmitkNDIConfigurationWidget.h.
Referenced by UpdateToolTable().
|
protected |
tracking device object
Definition at line 125 of file QmitkNDIConfigurationWidget.h.
Referenced by CreateTracker(), GetStatusText(), GetToolNamesList(), GetTracker(), OnAddPassiveTool(), OnConnect(), OnDisconnect(), OnDiscoverTools(), OnLoadTool(), OnSaveTool(), OnTableCellChanged(), SetupTracker(), UpdateToolTable(), UpdateTrackerFromToolTable(), UpdateWidgets(), and ~QmitkNDIConfigurationWidget().