52 m_Controls =
new Ui::QmitkIGTConnectionWidgetControls;
61 connect( (QObject*)(
m_Controls->connectButton), SIGNAL(clicked()),
this, SLOT(
OnConnect()) );
79 mitk::TrackingDeviceSourceConfigurator::Pointer myTrackingDeviceSourceFactory =
85 m_Controls->connectButton->setText(
"Disconnect");
88 m_Controls->trackingDeviceConfigurationWidget->setEnabled(
false);
95 QMessageBox::warning(
nullptr,
"Warning",error);
108 MITK_ERROR<<
"Could not create TrackingDevice";
126 m_Controls->connectButton->setText(
"Connect");
128 m_Controls->trackingDeviceConfigurationWidget->setEnabled(
true);
138 std::string filename = qFilename.toStdString();
139 mitk::NavigationToolStorageDeserializer::Pointer myDeserializer = mitk::NavigationToolStorageDeserializer::New(this->
m_DataStorage);
140 mitk::NavigationToolStorage::Pointer tempStorage = myDeserializer->Deserialize(filename);
143 if (tempStorage.IsNull())
151 if (tempStorage->GetToolCount()>0)
153 lastDevice = tempStorage->GetTool(0)->GetTrackingDeviceType();
157 m_ErrorMessage =
"Error: Didn't find a tool in the storage. Do you want to navigate without even an instrument?";
161 for (
unsigned int i=1; i<tempStorage->GetToolCount(); i++)
163 if (lastDevice!=tempStorage->GetTool(i)->GetTrackingDeviceType())
165 m_ErrorMessage =
"Error: Toolfile contains tools of different tracking devices which is not acceptable for this application.";
168 else lastDevice = tempStorage->GetTool(i)->GetTrackingDeviceType();
171 if (
m_TrackingDevice->GetType()!=tempStorage->GetTool(0)->GetTrackingDeviceType())
173 m_ErrorMessage =
"Tools are not compliant with this tracking device. Please use correct toolfile for specified device.";
181 m_ErrorMessage =
"Error: No DataStorage available! Make sure the widget is initialized with a DataStorage";
191 if (currentNode.IsNotNull())
static void SetLastFileLoadPathByFileName(const QString &str)
static const QString GetLastFileLoadPath()
std::string TrackingDeviceType