diff --git a/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.cpp b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.cpp new file mode 100644 index 0000000000..e688b4fb98 --- /dev/null +++ b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.cpp @@ -0,0 +1,209 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Language: C++ +Date: $Date: 2009-05-12 19:14:45 +0200 (Di, 12 Mai 2009) $ +Version: $Revision: 1.12 $ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "QmitkIGTConnectionWidget.h" +#include "QmitkTrackingDeviceConfigurationWidget.h" + +#include "mitkClaronTrackingDevice.h" +#include "mitkNDITrackingDevice.h" + +#include "mitkNavigationToolStorageDeserializer.h" +#include "mitkTrackingDeviceSourceConfigurator.h" + +#include +#include + +const std::string QmitkIGTConnectionWidget::VIEW_ID = "org.mitk.views.igtconnectionwidget"; + +QmitkIGTConnectionWidget::QmitkIGTConnectionWidget(QWidget* parent, Qt::WindowFlags f) + : QWidget(parent, f) +{ + m_Controls = NULL; + CreateQtPartControl(this); + CreateConnections(); + m_TrackingDevice = NULL; + m_TrackingDeviceSource = NULL; + m_NavigationToolStorage = NULL; + m_DataStorage = NULL; + m_ErrorMessage = ""; +} + + +QmitkIGTConnectionWidget::~QmitkIGTConnectionWidget() +{ +} + +void QmitkIGTConnectionWidget::CreateQtPartControl(QWidget *parent) +{ + if (!m_Controls) + { + // create GUI widgets + m_Controls = new Ui::QmitkIGTConnectionWidgetControls; + m_Controls->setupUi(parent); + // configure trackingDeviceConfigurationWidget + m_Controls->trackingDeviceConfigurationWidget->SetGUIStyle(QmitkTrackingDeviceConfigurationWidget::SIMPLE); + } +} + +void QmitkIGTConnectionWidget::CreateConnections() +{ + if ( m_Controls ) + { + connect( (QObject*)(m_Controls->connectButton), SIGNAL(clicked()), this, SLOT(OnConnect()) ); + } +} + +void QmitkIGTConnectionWidget::OnConnect() +{ + if (m_Controls->connectButton->isChecked()) // Load tools and connect tracking device + { + m_Controls->connectButton->setChecked(false); + // create TrackingDevice + m_TrackingDevice = m_Controls->trackingDeviceConfigurationWidget->GetTrackingDevice(); + if (m_TrackingDevice.IsNotNull()) + { + QString fileName = QFileDialog::getOpenFileName(NULL,tr("Open Navigation tool storage"), "/", tr("Toolfile (*.tfl)")); + if (LoadToolfile(fileName)) + { + // Create TrackingDeviceSource and add tools + mitk::TrackingDeviceSourceConfigurator::Pointer myTrackingDeviceSourceFactory = + mitk::TrackingDeviceSourceConfigurator::New(this->m_NavigationToolStorage,m_TrackingDevice); + m_TrackingDeviceSource = myTrackingDeviceSourceFactory->CreateTrackingDeviceSource(); + m_TrackingDeviceSource->Connect(); + m_TrackingDeviceSource->StartTracking(); + // change button text + m_Controls->connectButton->setText("Disconnect"); + m_Controls->connectButton->setChecked(true); + emit TrackingDeviceConnected(); + } + else + { + QString error(m_ErrorMessage.c_str()); + QMessageBox::warning(NULL,"Warning",error); + // reset button to unchecked + m_Controls->connectButton->setChecked(false); + // remove tool nodes from DataStorage + this->RemoveToolNodes(); + // reset NavigationToolStorage + m_NavigationToolStorage = NULL; + } + } + else + { + // reset button to unchecked + m_Controls->connectButton->setChecked(false); + MITK_ERROR<<"Could not create TrackingDevice"; + } + } + else // Disconnect tracking device + { + // disconnect TrackingDeviceSource + if (m_TrackingDeviceSource.IsNotNull()) + { + m_TrackingDeviceSource->StopTracking(); + m_TrackingDeviceSource->Disconnect(); + } + // remove tool nodes from DataStorage + this->RemoveToolNodes(); + // reset members + m_NavigationToolStorage = NULL; + m_TrackingDevice = NULL; + m_TrackingDeviceSource = NULL; + // change button text + m_Controls->connectButton->setText("Connect"); + emit TrackingDeviceDisconnected(); + } +} + +bool QmitkIGTConnectionWidget::LoadToolfile(QString qFilename) +{ + if (m_DataStorage.IsNotNull()) + { + std::string filename = qFilename.toStdString(); + mitk::NavigationToolStorageDeserializer::Pointer myDeserializer = mitk::NavigationToolStorageDeserializer::New(this->m_DataStorage); + mitk::NavigationToolStorage::Pointer tempStorage = myDeserializer->Deserialize(filename); + m_NavigationToolStorage = tempStorage; + + if (tempStorage.IsNull()) + { + m_ErrorMessage = myDeserializer->GetErrorMessage(); + return false; + } + + // check if there are tools in the storage + mitk::TrackingDeviceType lastDevice; + if (tempStorage->GetToolCount()>0) + { + lastDevice = tempStorage->GetTool(0)->GetTrackingDeviceType(); + } + else + { + m_ErrorMessage = "Error: Didn't find a tool in the storage. Do you want to navigate without even an instrument?"; + return false; + } + //check if all tools are from the same device + for (int i=1; iGetToolCount(); i++) + { + if (lastDevice!=tempStorage->GetTool(i)->GetTrackingDeviceType()) + { + m_ErrorMessage = "Error: Toolfile contains tools of different tracking devices which is not acceptable for this application."; + return false; + } + else lastDevice = tempStorage->GetTool(i)->GetTrackingDeviceType(); + } + // check if tracking device typ of tools corresponds with chosen tracking device + if (m_TrackingDevice->GetType()!=tempStorage->GetTool(0)->GetTrackingDeviceType()) + { + m_ErrorMessage = "Tools are not compliant with this tracking device. Please use correct toolfile for specified device."; + return false; + } + m_NavigationToolStorage = tempStorage; + return true; + } + else + { + m_ErrorMessage = "Error: No DataStorage available! Make sure the widget is initialized with a DataStorage"; + return false; + } +} + +void QmitkIGTConnectionWidget::RemoveToolNodes() +{ + for (int i=0; iGetToolCount(); i++) + { + mitk::DataNode::Pointer currentNode = m_NavigationToolStorage->GetTool(i)->GetDataNode(); + if (currentNode.IsNotNull()) + { + m_DataStorage->Remove(currentNode); + } + } +} + +mitk::TrackingDeviceSource::Pointer QmitkIGTConnectionWidget::GetTrackingDeviceSource() +{ + return m_TrackingDeviceSource; +} + +void QmitkIGTConnectionWidget::SetDataStorage( mitk::DataStorage::Pointer dataStorage ) +{ + m_DataStorage = dataStorage; +} + +mitk::NavigationToolStorage::Pointer QmitkIGTConnectionWidget::GetNavigationToolStorage() +{ + return m_NavigationToolStorage; +} diff --git a/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.h b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.h new file mode 100644 index 0000000000..b499b1ded0 --- /dev/null +++ b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidget.h @@ -0,0 +1,114 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Language: C++ +Date: $Date: 2009-05-12 19:14:45 +0200 (Di, 12 Mai 2009) $ +Version: $Revision: 1.12 $ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef QmitkIGTConnectionWidget_H +#define QmitkIGTConnectionWidget_H + +#include +#include "MitkIGTUIExports.h" +#include "ui_QmitkIGTConnectionWidgetControls.h" + +#include "mitkDataStorage.h" +#include "mitkNavigationToolStorage.h" +#include "mitkTrackingDevice.h" +#include "mitkTrackingDeviceSource.h" + + +//itk headers + + /** Documentation: + * \brief Simple and fast access to a pre-configured TrackingDeviceSource. + * + * This widget creates a fully configured, connected and started TrackingDeviceSource. + * Clicking "Connect" requires to specify a NavigationToolStorage that holds all tools to be used + * in the application. Corresponding surfaces are added to the DataStorage that has to be set for + * the widget. + * + * Inputs: DataStorage + * Outputs: TrackingDeviceSource, NavigationToolStorage + * Signals: TrackingDeviceConnected, TrackingDeviceDisconnected + * + * \ingroup IGTUI + */ +class MitkIGTUI_EXPORT QmitkIGTConnectionWidget : public QWidget +{ + Q_OBJECT + + public: + static const std::string VIEW_ID; + + QmitkIGTConnectionWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); + ~QmitkIGTConnectionWidget(); + + /* @return Returns the preconfigured and connected TrackingDeviceSource ready to use in an IGT pipeline. + */ + mitk::TrackingDeviceSource::Pointer GetTrackingDeviceSource(); + /*! + \brief Get the NavigationToolStorage holding all tools with corresponding surface objects + */ + mitk::NavigationToolStorage::Pointer GetNavigationToolStorage(); + /*! + \brief set DataStorage that is used to put the navigation tools + */ + void SetDataStorage(mitk::DataStorage::Pointer dataStorage); + + + signals: + /*! + \brief signal emitted when TrackingDevice was successfully connected + */ + void TrackingDeviceConnected(); + /*! + \brief signal emitted when TrackingDevice was successfully disconnected + */ + void TrackingDeviceDisconnected(); + + protected slots: + /*! + \brief Asks the user to specify a tool file and finally connects the TrackingDeviceSource + */ + void OnConnect(); + + protected: + + /// \brief Creation of the connections + virtual void CreateConnections(); + + virtual void CreateQtPartControl(QWidget *parent); + + /*! + \brief Load NavigationToolStorage from given filename and set according member + \param qFilename file location of the NavigationToolStorage + \return success of load operation (true if load successful, false otherwise) m_ErrorMessage holds the problem description + */ + bool LoadToolfile(QString qFilename); + + /*! + \brief Remove the tool nodes currently associated to the tools hold in the NavigationToolStorage from the DataStorage + */ + void RemoveToolNodes(); + + Ui::QmitkIGTConnectionWidgetControls* m_Controls; + + mitk::DataStorage::Pointer m_DataStorage; ///< data storage to put navigation tools + mitk::TrackingDevice::Pointer m_TrackingDevice; ///< tracking device currently connected + mitk::TrackingDeviceSource::Pointer m_TrackingDeviceSource; ///< holds the preconfigured source of the IGT pipeline which is provided by this widget for further processing + mitk::NavigationToolStorage::Pointer m_NavigationToolStorage; ///< holds all navigation tools currently loaded + + std::string m_ErrorMessage; ///< current problem description +}; +#endif \ No newline at end of file diff --git a/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidgetControls.ui b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidgetControls.ui new file mode 100644 index 0000000000..ff471e1b4e --- /dev/null +++ b/Modules/IGTUI/Qmitk/QmitkIGTConnectionWidgetControls.ui @@ -0,0 +1,149 @@ + + + QmitkIGTConnectionWidgetControls + + + + 0 + 0 + 289 + 296 + + + + + 0 + 0 + + + + QmitkIGTConnection + + + + + + + 11 + 50 + false + + + + Tracking Device Connection + + + + + + + + 0 + 0 + + + + + + + + + + + true + + + + 0 + 0 + + + + + 0 + 50 + + + + + 10 + + + + Connect to camera + + + Connect + + + + :/IGTUI/powerRed.png + :/IGTUI/powerGreen.png:/IGTUI/powerRed.png + + + + 30 + 30 + + + + true + + + + + + + Qt::Vertical + + + + 242 + 143 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + QmitkTrackingDeviceConfigurationWidget + QWidget +
QmitkTrackingDeviceConfigurationWidget.h
+ 1 +
+
+ + + + + +
diff --git a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.cpp b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.cpp index c0e2a773e5..c3ef981984 100644 --- a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.cpp +++ b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.cpp @@ -1,260 +1,339 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-05-12 19:14:45 +0200 (Di, 12 Mai 2009) $ Version: $Revision: 1.12 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "QmitkTrackingDeviceConfigurationWidget.h" #include "mitkClaronTrackingDevice.h" #include "mitkNDITrackingDevice.h" #include "mitkSerialCommunication.h" #include "qscrollbar.h" const std::string QmitkTrackingDeviceConfigurationWidget::VIEW_ID = "org.mitk.views.trackingdeviceconfigurationwidget"; QmitkTrackingDeviceConfigurationWidget::QmitkTrackingDeviceConfigurationWidget(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f) { m_Controls = NULL; CreateQtPartControl(this); CreateConnections(); //reset a few things ResetOutput(); AddOutput("
NDI Polaris selected"); this->m_TrackingDeviceConfigurated = false; m_AdvancedUserControl = true; } +void QmitkTrackingDeviceConfigurationWidget::SetGUIStyle(QmitkTrackingDeviceConfigurationWidget::Style style) +{ +switch(style) + { + case QmitkTrackingDeviceConfigurationWidget::SIMPLE: + + //move all UI elements to an empty dummy layout + //m_Controls->dummyLayout->addItem(m_Controls->mainLayout); + m_Controls->dummyLayout->addWidget(m_Controls->widget_title_label); + m_Controls->dummyLayout->addWidget(m_Controls->choose_tracking_device_label); + m_Controls->dummyLayout->addWidget(m_Controls->polaris_label); + m_Controls->dummyLayout->addWidget( m_Controls->aurora_label); + m_Controls->dummyLayout->addWidget(m_Controls->aurora_label); + m_Controls->dummyLayout->addWidget(m_Controls->microntracker_label); + m_Controls->dummyLayout->addWidget(m_Controls->m_testConnectionMicronTracker); + m_Controls->dummyLayout->addWidget(m_Controls->m_outputTextMicronTracker); + m_Controls->dummyLayout->addWidget(m_Controls->m_outputTextAurora); + m_Controls->dummyLayout->addWidget(m_Controls->m_testConnectionAurora); + m_Controls->dummyLayout->addWidget(m_Controls->m_outputTextPolaris); + m_Controls->dummyLayout->addWidget(m_Controls->m_testConnectionPolaris); + m_Controls->dummyLayout->addWidget(m_Controls->m_polarisTrackingModeBox); + m_Controls->dummyLayout->addWidget(m_Controls->m_finishedLine); + m_Controls->dummyLayout->addWidget(m_Controls->line); + m_Controls->dummyLayout->addWidget(m_Controls->configuration_finished_label); + m_Controls->dummyLayout->addItem(m_Controls->horizontalLayout_4); + m_Controls->mainLayout->removeItem(m_Controls->horizontalLayout_4); + m_Controls->dummyLayout->addWidget(m_Controls->configuration_finished_label); + m_Controls->dummyLayout->addItem(m_Controls->verticalSpacer_2); + m_Controls->verticalLayout_3->removeItem(m_Controls->verticalSpacer_2); + m_Controls->dummyLayout->addItem(m_Controls->horizontalSpacer_9); + m_Controls->horizontalLayout_9->removeItem(m_Controls->horizontalSpacer_9); + m_Controls->dummyLayout->addItem(m_Controls->horizontalSpacer_3); + m_Controls->horizontalLayout_11->removeItem(m_Controls->horizontalSpacer_3); + m_Controls->dummyLayout->addItem(m_Controls->verticalSpacer_3); + m_Controls->verticalLayout_7->removeItem(m_Controls->verticalSpacer_3); + m_Controls->dummyLayout->addItem(m_Controls->verticalSpacer_4); + m_Controls->verticalLayout_10->removeItem(m_Controls->verticalSpacer_4); + m_Controls->dummyLayout->addItem(m_Controls->horizontalSpacer_10); + m_Controls->verticalLayout_10->removeItem(m_Controls->horizontalSpacer_10); + + //set height to min + m_Controls->m_outputTextPolaris->setMinimumHeight(0); + m_Controls->m_outputTextPolaris->setMaximumHeight(0); + m_Controls->m_outputTextMicronTracker->setMinimumHeight(0); + m_Controls->m_outputTextMicronTracker->setMaximumHeight(0); + m_Controls->m_outputTextAurora->setMinimumHeight(0); + m_Controls->m_outputTextAurora->setMaximumHeight(0); + m_Controls->m_finishedButton->setMinimumHeight(0); + m_Controls->m_finishedButton->setMaximumHeight(0); + m_Controls->m_resetButton->setMinimumHeight(0); + m_Controls->m_resetButton->setMaximumHeight(0); + + + //set the height of the tracking device combo box + m_Controls->m_trackingDeviceChooser->setMinimumHeight(50); + + //move back the used elemets to the main layout + m_Controls->simpleLayout->addWidget(m_Controls->m_trackingDeviceChooser); + m_Controls->simpleLayout->addWidget(m_Controls->m_TrackingSystemWidget); + + m_Controls->mainWidget->setCurrentIndex(1); + + this->setMaximumHeight(150); + + this->EnableAdvancedUserControl(false); + + + break; + + case QmitkTrackingDeviceConfigurationWidget::ADVANCED: + + //default at the moment => start settings are advanced + + break; + + } + +} + QmitkTrackingDeviceConfigurationWidget::~QmitkTrackingDeviceConfigurationWidget() { } void QmitkTrackingDeviceConfigurationWidget::CreateQtPartControl(QWidget *parent) { if (!m_Controls) { // create GUI widgets m_Controls = new Ui::QmitkTrackingDeviceConfigurationWidgetControls; m_Controls->setupUi(parent); } } void QmitkTrackingDeviceConfigurationWidget::CreateConnections() { if ( m_Controls ) { connect( (QObject*)(m_Controls->m_trackingDeviceChooser), SIGNAL(currentIndexChanged(int)), this, SLOT(TrackingDeviceChanged()) ); connect( (QObject*)(m_Controls->m_testConnectionPolaris), SIGNAL(clicked()), this, SLOT(TestConnection()) ); connect( (QObject*)(m_Controls->m_testConnectionAurora), SIGNAL(clicked()), this, SLOT(TestConnection()) ); connect( (QObject*)(m_Controls->m_testConnectionMicronTracker), SIGNAL(clicked()), this, SLOT(TestConnection()) ); connect( (QObject*)(m_Controls->m_resetButton), SIGNAL(clicked()), this, SLOT(ResetByUser()) ); connect( (QObject*)(m_Controls->m_finishedButton), SIGNAL(clicked()), this, SLOT(Finished()) ); //set a few UI components depending on Windows / Linux #ifdef WIN32 m_Controls->portTypeLabelPolaris->setVisible(false); m_Controls->portTypePolaris->setVisible(false); m_Controls->portTypeLabelAurora->setVisible(false); m_Controls->portTypeAurora->setVisible(false); #else m_Controls->comPortLabelAurora->setText("Port Nr:"); m_Controls->m_comPortLabelPolaris->setText("Port Nr:"); m_Controls->m_portSpinBoxAurora->setPrefix(""); m_Controls->m_portSpinBoxPolaris->setPrefix(""); #endif } } void QmitkTrackingDeviceConfigurationWidget::TrackingDeviceChanged() { //show the correspondig widget m_Controls->m_TrackingSystemWidget->setCurrentIndex(m_Controls->m_trackingDeviceChooser->currentIndex()); //the new trackingdevice is not configurated yet m_TrackingDeviceConfigurated = false; //reset output ResetOutput(); //print output if (m_Controls->m_trackingDeviceChooser->currentIndex()==0) AddOutput("
NDI Polaris selected"); //NDI Polaris else if (m_Controls->m_trackingDeviceChooser->currentIndex()==1) AddOutput("
NDI Aurora selected"); //NDI Aurora else if (m_Controls->m_trackingDeviceChooser->currentIndex()==2) AddOutput("
Microntracker selected"); //ClaronTechnology MicronTracker 2 } void QmitkTrackingDeviceConfigurationWidget::EnableUserReset(bool enable) { if (enable) m_Controls->m_resetButton->setVisible(true); else m_Controls->m_resetButton->setVisible(false); } void QmitkTrackingDeviceConfigurationWidget::TestConnection() { //#### Step 1: construct a tracking device: mitk::TrackingDevice::Pointer testTrackingDevice = ConstructTrackingDevice(); //#### Step 2: test connection and start tracking, generate output AddOutput("
testing connection
..."); if (testTrackingDevice->OpenConnection()) { AddOutput(" OK"); AddOutput("
testing tracking
..."); if (testTrackingDevice->StartTracking()) { AddOutput(" OK"); if (!testTrackingDevice->StopTracking())AddOutput("
ERROR while stop tracking
"); } else AddOutput(" ERROR!"); if (!testTrackingDevice->CloseConnection())AddOutput("
ERROR while closing connection
"); } else AddOutput(" ERROR!"); } void QmitkTrackingDeviceConfigurationWidget::Finished() { m_TrackingDevice = ConstructTrackingDevice(); m_Controls->m_TrackingSystemWidget->setEnabled(false); m_Controls->m_trackingDeviceChooser->setEnabled(false); m_Controls->choose_tracking_device_label->setEnabled(false); m_Controls->configuration_finished_label->setText("\n\n

Configuration finished

"); this->m_TrackingDeviceConfigurated = true; emit TrackingDeviceConfigurationFinished(); } void QmitkTrackingDeviceConfigurationWidget::Reset() { m_TrackingDevice = NULL; m_Controls->m_TrackingSystemWidget->setEnabled(true); m_Controls->m_trackingDeviceChooser->setEnabled(true); m_Controls->choose_tracking_device_label->setEnabled(true); m_Controls->configuration_finished_label->setText("\n\n

Press \"Finished\" to confirm configuration

"); this->m_TrackingDeviceConfigurated = false; emit TrackingDeviceConfigurationReseted(); } void QmitkTrackingDeviceConfigurationWidget::ResetByUser() { Reset(); } //######################### internal help methods ####################################### void QmitkTrackingDeviceConfigurationWidget::ResetOutput() { m_output.str(""); m_output <<"output:"; m_Controls->m_outputTextAurora->setHtml(QString(m_output.str().c_str())); m_Controls->m_outputTextPolaris->setHtml(QString(m_output.str().c_str())); m_Controls->m_outputTextMicronTracker->setHtml(QString(m_output.str().c_str())); } void QmitkTrackingDeviceConfigurationWidget::AddOutput(std::string s) { //print output m_output << s; m_Controls->m_outputTextAurora->setHtml(QString(m_output.str().c_str())); m_Controls->m_outputTextPolaris->setHtml(QString(m_output.str().c_str())); m_Controls->m_outputTextMicronTracker->setHtml(QString(m_output.str().c_str())); m_Controls->m_outputTextPolaris->verticalScrollBar()->setValue(m_Controls->m_outputTextPolaris->verticalScrollBar()->maximum()); m_Controls->m_outputTextAurora->verticalScrollBar()->setValue(m_Controls->m_outputTextAurora->verticalScrollBar()->maximum()); m_Controls->m_outputTextMicronTracker->verticalScrollBar()->setValue(m_Controls->m_outputTextMicronTracker->verticalScrollBar()->maximum()); repaint(); } mitk::TrackingDevice::Pointer QmitkTrackingDeviceConfigurationWidget::ConstructTrackingDevice() { mitk::TrackingDevice::Pointer returnValue; //#### Step 1: configure tracking device: if (m_Controls->m_trackingDeviceChooser->currentIndex()==0)//NDI Polaris { if(m_Controls->m_radioPolaris5D->isChecked()) //5D Tracking { //not yet in the open source part so we'll only get NULL here. returnValue = ConfigureNDI5DTrackingDevice(); } else //6D Tracking { returnValue = ConfigureNDI6DTrackingDevice(); returnValue->SetType(mitk::NDIPolaris); } } else if (m_Controls->m_trackingDeviceChooser->currentIndex()==1)//NDI Aurora { returnValue = ConfigureNDI6DTrackingDevice(); returnValue->SetType(mitk::NDIAurora); } else if (m_Controls->m_trackingDeviceChooser->currentIndex()==2)//ClaronTechnology MicronTracker 2 { returnValue = mitk::ClaronTrackingDevice::New(); } return returnValue; } mitk::TrackingDevice::Pointer QmitkTrackingDeviceConfigurationWidget::ConfigureNDI5DTrackingDevice() { return NULL; } mitk::TrackingDevice::Pointer QmitkTrackingDeviceConfigurationWidget::ConfigureNDI6DTrackingDevice() { mitk::NDITrackingDevice::Pointer tempTrackingDevice = mitk::NDITrackingDevice::New(); //build prefix (depends on linux/win) QString prefix = ""; #ifdef WIN32 prefix ="COM"; #else if (m_Controls->m_trackingDeviceChooser->currentIndex()==1) //Aurora prefix = m_Controls->portTypeAurora->currentText(); else //Polaris prefix = m_Controls->portTypePolaris->currentText(); #endif //get port int port = 0; if (m_Controls->m_trackingDeviceChooser->currentIndex()==1) port = m_Controls->m_portSpinBoxAurora->value(); else port = m_Controls->m_portSpinBoxPolaris->value(); //build port name string QString portName = prefix + QString::number(port); tempTrackingDevice->SetDeviceName(portName.toStdString()); //set the port name mitk::TrackingDevice::Pointer returnValue = static_cast(tempTrackingDevice); return returnValue; } mitk::TrackingDevice::Pointer QmitkTrackingDeviceConfigurationWidget::GetTrackingDevice() { if (!m_AdvancedUserControl) m_TrackingDevice = ConstructTrackingDevice(); return this->m_TrackingDevice; } bool QmitkTrackingDeviceConfigurationWidget::GetTrackingDeviceConfigured() { return this->m_TrackingDeviceConfigurated; } void QmitkTrackingDeviceConfigurationWidget::ConfigurationFinished() { Finished(); } void QmitkTrackingDeviceConfigurationWidget::EnableAdvancedUserControl(bool enable) { m_AdvancedUserControl = enable; m_Controls->configuration_finished_label->setVisible(enable); m_Controls->m_finishedLine->setVisible(enable); m_Controls->m_resetButton->setVisible(enable); m_Controls->m_finishedButton->setVisible(enable); } diff --git a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.h b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.h index 8979dea604..346fdcc27f 100644 --- a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.h +++ b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidget.h @@ -1,158 +1,168 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-05-12 19:14:45 +0200 (Di, 12 Mai 2009) $ Version: $Revision: 1.12 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef QMITKTRACKINGDEVICECONFIGURATIONWIDGET_H #define QMITKTRACKINGDEVICECONFIGURATIONWIDGET_H #include #include "MitkIGTUIExports.h" #include "ui_QmitkTrackingDeviceConfigurationWidgetControls.h" #include "mitkTrackingDevice.h" //itk headers /** Documentation: * \brief An object of this class offers an UI to configurate * a tracking device. If the user finished the configuration process and * a fully configurated tracking device is availiabe the object emits a * signal "TrackingDeviceConfigurationFinished()". You can then get the * tracking device by calling the method GetTrackingDevice(). * * Once the tracking device is configurated there are two ways to reset * the UI to allow the user for configuring a new device. The method Reset() * can be called and there is also a button "reset" which can be pressed by * the user. In both cases a signal "TrackingDeviceConfigurationReseted()" * is emitted and you may wait for a new configurated tracking device. * * The possibility to reset the configuration by the user can also be switched * of by calling the method EnableUserReset(boolean enable). * * \ingroup IGTUI */ class MitkIGTUI_EXPORT QmitkTrackingDeviceConfigurationWidget : public QWidget { Q_OBJECT public: static const std::string VIEW_ID; QmitkTrackingDeviceConfigurationWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); ~QmitkTrackingDeviceConfigurationWidget(); /* @return Returns the current configurated tracking device. If the user didn't finished the * configuration process NULL is returned. */ mitk::TrackingDevice::Pointer GetTrackingDevice(); + enum Style + { + SIMPLE, + ADVANCED, + }; + /* @brief Resets the UI to allow the user for configurating a new tracking device. */ void Reset(); /** @brief External call to disable this widget when configuration is finished. This is also called by the "finished" button, * but if you disable the advanced user control you might want to call this when the configuration is finished. * If you want to configure a new device call the Reset() funktion later. */ void ConfigurationFinished(); /* @brief Sets our unsets the possibility to reset the UI and start * a new configuration by the user. Concretely this means the * button "reset" is shown or not. */ void EnableUserReset(bool enable); - /** @return Returns true if the tracking device is completely configured (you can get it by calling GetTrackingDevice() in this case). + /** @return Returns true if the tracking device is completely configured (you can get it by calling GetTrackingDevice() in this case). * Returns false if configuration is not finished. */ bool GetTrackingDeviceConfigured(); + /** @brief Sets the style of this widget. Default is ADVANCED. Caution: The style can only be set once at startup! */ + void SetGUIStyle(Style style); + /** @brief Enables/disables the advanced user controls which means the reset and finished button. When disabled you'll get NO * signals from this widget and you've to check by yourself if the configuration is finished. Default value is false. + * Advanced user control is only availiable when style is ADVANCED. */ void EnableAdvancedUserControl(bool enable); signals: /* @brief This signal is sent if the user has finished the configuration of the tracking device. * The device is now availiable if the method GetTrackingDevice() is called. The tracking * device you'll get is completly configurated but no tools are added yet. */ void TrackingDeviceConfigurationFinished(); /* @brief This signal is sent if the UI was reseted and the user is required to configurate * a new tracking device. */ void TrackingDeviceConfigurationReseted(); protected: /// \brief Creation of the connections virtual void CreateConnections(); virtual void CreateQtPartControl(QWidget *parent); Ui::QmitkTrackingDeviceConfigurationWidgetControls* m_Controls; std::stringstream m_output; mitk::TrackingDevice::Pointer m_TrackingDevice; bool m_TrackingDeviceConfigurated; bool m_AdvancedUserControl; //######################### internal help methods ####################################### void ResetOutput(); void AddOutput(std::string s); mitk::TrackingDevice::Pointer ConstructTrackingDevice(); protected slots: /* @brief This method is called when the user changes the selection of the trackingdevice (m_trackingDeviceChooser). It then sets the correct widget for the selected tracking device.*/ void TrackingDeviceChanged(); /* @brief This method is called when the user presses the button "test connection". The method will then create a temporary tracking device, * try to open a connection and start tracking. The user can see the result of the connection test on the small output window. */ void TestConnection(); /* @brief This method is called when the user presses the button "finished". A new tracking device will be created in this case and will then * then be availiable by calling GetTrackingDevice(). Also a signal TrackingDeviceConfigurationFinished() will be emitted. After this the * UI will be disablet until the widget is reseted to configure a new tracking device. */ void Finished(); /* @brief This method is called when the user presses the button "reset". He can configure a new tracking device then. The signal * TrackingDeviceConfigurationReseted() will be emitted if this method is called. The method GetTrackingDevice() will return * NULL until a new tracking device is configured. */ void ResetByUser(); /* @return Returns a configured NDI 5D tracking device. Unfortunately the NDI 5D tracking device is not yet in the open source part * so this method only returns NULL at the moment. */ virtual mitk::TrackingDevice::Pointer ConfigureNDI5DTrackingDevice(); /* @return Returns a configured NDI 6D tracking device. * The type (which means Aurora/Polaris) will not be set in the returnvalue. You have to this later. */ mitk::TrackingDevice::Pointer ConfigureNDI6DTrackingDevice(); }; #endif \ No newline at end of file diff --git a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidgetControls.ui b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidgetControls.ui index 59fc386402..b7936ac2d3 100644 --- a/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidgetControls.ui +++ b/Modules/IGTUI/Qmitk/QmitkTrackingDeviceConfigurationWidgetControls.ui @@ -1,689 +1,776 @@ QmitkTrackingDeviceConfigurationWidgetControls 0 0 - 455 - 376 + 412 + 481 Form - + - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">Tracking Device Configuration</span></p></body></html> - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Horizontal - - - - 128 - 20 - - - - - - - - Choose tracking device: - - - - - - - - Polaris (NDI) - - - - - Aurora (NDI) - - - - - MicronTracker (Claron Technology) - - - - - - - - - - Qt::Horizontal + + + 0 - - - - - 1 + 0 - + - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">Polaris</span></p></body></html> - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - + - - - - - - - Com Port: - - - - - - - - - - COM - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + - - - - - Port Type: - - - - - - - - /dev/ttyUSB - - - - - /dev/ttyS - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Tracking Mode + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> + <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">Tracking Device Configuration</span></p></body></html> + - - - - - - - false - - - 5D Tracking - - - false - - - - - - - 6D Tracking - - - true - - - - - - + + + + - + - Qt::Vertical - - - QSizePolicy::Expanding + Qt::Horizontal - 158 - 17 + 128 + 20 - - - - - - - - - - - 120 - 80 - - - - - 120 - 80 - - - - - 120 - 0 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;" bgcolor="#000000"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:7pt; text-decoration: underline; color:#ffffff;">output:</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:7pt; color:#ffffff;">NDI Polaris selected</span></p></body></html> - - - Qt::NoTextInteraction + + + Choose tracking device: - - - - 120 - 0 - - - - - 120 - 16777215 - - - - Test Connection + + + + 0 + 0 + + + + Polaris + + + + + Aurora + + + + + MicronTracker + + - - - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">Aurora</span></p></body></html> - - - - + Qt::Horizontal - - - 40 - 20 - - - + - - - - - - - - - - - Com Port: - - - + + + 0 + + + - - - COM - - + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> + <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">Polaris</span></p></body></html> + + + + + + + + + + + + Com Port: + + + + + + + + + + COM + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Port Type: + + + + + + + + /dev/ttyUSB + + + + + /dev/ttyS + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + + + Tracking Mode + + + + + + false + + + 5D + + + false + + + + + + + 6D + + + true + + + + + + + Qt::Horizontal + + + + 62 + 20 + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 158 + 17 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + + + + + 120 + 80 + + + + + 120 + 80 + + + + + 120 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;" bgcolor="#000000"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:7pt; text-decoration: underline; color:#ffffff;">output:</span><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:7pt; color:#ffffff;">NDI Polaris selected</span> </p></body></html> + + + Qt::NoTextInteraction + + + + + + + + 120 + 0 + + + + + 120 + 16777215 + + + + Test Connection + + + + - - - + + + - - - Port Type: - - + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> + <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">Aurora</span></p></body></html> + + + + + - + - - /dev/ttyUSB - + + + + + + + Com Port: + + + + + + + COM + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Port Type: + + + + + + + + /dev/ttyUSB + + + + + /dev/ttyS + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - /dev/ttyS - + + + + + + 120 + 80 + + + + + 120 + 80 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;" bgcolor="#000000"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; text-decoration: underline; color:#ffffff;">output:</span> </p></body></html> + + + Qt::NoTextInteraction + + + + + + + + 120 + 0 + + + + + 120 + 16777215 + + + + test connection + + + + - + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> + <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">MicronTracker</span></p></body></html> + + + + + - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 120 - 80 - - - - - 120 - 80 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + 120 + 80 + + + + + 120 + 80 + + + + + 120 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;" bgcolor="#000000"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#ffffff;">output:</span></p></body></html> - - - Qt::NoTextInteraction - - - - - - - - 120 - 0 - - - - - 120 - 16777215 - - - - test connection - - - - +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;" bgcolor="#000000"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; text-decoration: underline; color:#ffffff;">output:</span> </p></body></html> + + + Qt::NoTextInteraction + + + + + + + + 120 + 0 + + + + + 120 + 16777215 + + + + + 120 + 0 + + + + test connection + + + + + + + + + + - - - - - - - - - + - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; text-decoration: underline;">MicronTracker</span></p></body></html> + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + p, li { white-space: pre-wrap; } + </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> + <p align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-weight:600;">Press "Finished" to confirm configuration</span></p></body></html> + - + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 14 - - - - - + + + Qt::Horizontal + + + + + - + Qt::Horizontal 40 20 - - - Qt::Vertical + + + Reset - - - 20 - 40 - + + + + + + Finished - + - - + + + + + + + + + + 0 + + + + + + + Qt::Vertical + + + + 20 + 289 + + + + + + + + + + + + true + + + + + 0 + 0 + 98 + 28 + + + - - - - 120 - 80 - - - - - 120 - 80 - - - - - 120 - 0 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;" bgcolor="#000000"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#ffffff;">output:</span></p></body></html> - - - Qt::NoTextInteraction - - + - - - - 120 - 0 - - - - - 120 - 16777215 - + + + Qt::Vertical - + - 120 - 0 + 20 + 269 - - test connection - - + - - + + - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-weight:600;">Press "Finished" to confirm configuration</span></p></body></html> + + + + 16777215 + 0 + + - + Qt::Vertical 20 - 14 + 40 - - - - Qt::Horizontal - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Reset - - - - - - - Finished - - - - - + diff --git a/Modules/IGTUI/files.cmake b/Modules/IGTUI/files.cmake index c22c31f423..96cf6a9ef8 100644 --- a/Modules/IGTUI/files.cmake +++ b/Modules/IGTUI/files.cmake @@ -1,51 +1,54 @@ SET(CPP_FILES Qmitk/QmitkTrackingDeviceWidget.cpp Qmitk/QmitkTrackingDeviceConfigurationWidget.cpp Qmitk/QmitkNDIConfigurationWidget.cpp Qmitk/QmitkFiducialRegistrationWidget.cpp Qmitk/QmitkNDIToolDelegate.cpp Qmitk/QmitkNavigationToolManagementWidget.cpp Qmitk/QmitkIGTLoggerWidget.cpp Qmitk/QmitkUpdateTimerWidget.cpp Qmitk/QmitkToolDistanceWidget.cpp Qmitk/QmitkToolTrackingStatusWidget.cpp Qmitk/QmitkTrackingSourcesCheckBoxPanelWidget.cpp Qmitk/QmitkIGTPlayerWidget.cpp + Qmitk/QmitkIGTConnectionWidget.cpp ) SET(UI_FILES Qmitk/QmitkNavigationToolManagementWidgetControls.ui Qmitk/QmitkTrackingDeviceConfigurationWidgetControls.ui Qmitk/QmitkNDIConfigurationWidget.ui Qmitk/QmitkFiducialRegistrationWidget.ui Qmitk/QmitkIGTLoggerWidgetControls.ui Qmitk/QmitkUpdateTimerWidgetControls.ui Qmitk/QmitkToolDistanceWidgetControls.ui Qmitk/QmitkToolTrackingStatusWidgetControls.ui Qmitk/QmitkTrackingSourcesCheckBoxPanelWidgetControls.ui Qmitk/QmitkIGTPlayerWidgetControls.ui + Qmitk/QmitkIGTConnectionWidgetControls.ui ) SET(MOC_H_FILES Qmitk/QmitkNavigationToolManagementWidget.h Qmitk/QmitkTrackingDeviceWidget.h Qmitk/QmitkTrackingDeviceConfigurationWidget.h Qmitk/QmitkNDIConfigurationWidget.h Qmitk/QmitkFiducialRegistrationWidget.h Qmitk/QmitkNDIToolDelegate.h Qmitk/QmitkIGTLoggerWidget.h Qmitk/QmitkUpdateTimerWidget.h Qmitk/QmitkToolDistanceWidget.h Qmitk/QmitkToolTrackingStatusWidget.h Qmitk/QmitkTrackingSourcesCheckBoxPanelWidget.h Qmitk/QmitkIGTPlayerWidget.h + Qmitk/QmitkIGTConnectionWidget.h ) SET(QRC_FILES resources/IGTUI.qrc ) diff --git a/Modules/IGTUI/resources/IGTUI.qrc b/Modules/IGTUI/resources/IGTUI.qrc index 9c7ceb2b28..f1dd28ecda 100644 --- a/Modules/IGTUI/resources/IGTUI.qrc +++ b/Modules/IGTUI/resources/IGTUI.qrc @@ -1,15 +1,17 @@ record.png stop_recording.png play.png pause.png fastbackward.png fastforward.png previousframe.png nextframe.png firstframe.png lastframe.png stop.png + powerGreen.png + powerRed.png diff --git a/Modules/IGTUI/resources/powerGreen.png b/Modules/IGTUI/resources/powerGreen.png new file mode 100644 index 0000000000..9e8e0903d9 Binary files /dev/null and b/Modules/IGTUI/resources/powerGreen.png differ diff --git a/Modules/IGTUI/resources/powerRed.png b/Modules/IGTUI/resources/powerRed.png new file mode 100644 index 0000000000..bb3f33bef5 Binary files /dev/null and b/Modules/IGTUI/resources/powerRed.png differ