MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkMicronTrackerTypeInformation.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
14
16
17namespace mitk
18{
20 {
21 return "Claron Micron";
22 }
23
29
35
39
41 mitk::TrackingDevice::Pointer trackingDevice,
42 mitk::NavigationToolStorage::Pointer navigationTools,
43 std::string* errorMessage,
44 std::vector<int>* toolCorrespondencesInToolStorage)
45 {
46 mitk::TrackingDeviceSource::Pointer returnValue = mitk::TrackingDeviceSource::New();
47 mitk::ClaronTrackingDevice::Pointer thisDevice = dynamic_cast<mitk::ClaronTrackingDevice*>(trackingDevice.GetPointer());
48 *toolCorrespondencesInToolStorage = std::vector<int>();
49 //add the tools to the tracking device
50 for (unsigned int i = 0; i < navigationTools->GetToolCount(); i++)
51 {
52 mitk::NavigationTool::Pointer thisNavigationTool = navigationTools->GetTool(i);
53 toolCorrespondencesInToolStorage->push_back(i);
54 bool toolAddSuccess = thisDevice->AddTool(thisNavigationTool->GetToolName().c_str(), thisNavigationTool->GetCalibrationFile().c_str());
55 if (!toolAddSuccess)
56 {
57 //todo error handling
58 errorMessage->append("Can't add tool, is the toolfile valid?");
59 return nullptr;
60 }
61 thisDevice->GetTool(i)->SetToolTipPosition(thisNavigationTool->GetToolTipPosition(), thisNavigationTool->GetToolAxisOrientation());
62 }
63 returnValue->SetTrackingDevice(thisDevice);
64 return returnValue;
65 }
66}
An object of this class represents the MicronTracker device. You can add tools to this device,...
TrackingDeviceSource::Pointer CreateTrackingDeviceSource(mitk::TrackingDevice::Pointer trackingDevice, mitk::NavigationToolStorage::Pointer navigationTools, std::string *errorMessage, std::vector< int > *toolCorrespondencesInToolStorage) override
std::vector< TrackingDeviceData > m_TrackingDeviceData
IGT Exceptions.