MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkPolhemusTrackingDevice.h
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
13#ifndef mitkPolhemusTrackingDevice_h
14#define mitkPolhemusTrackingDevice_h
15
16
17#include <vector>
18#include <mitkIGTConfig.h>
19#include <mitkTrackingDevice.h>
20#include <mitkPolhemusTool.h>
21#include <thread>
22
23namespace mitk
24{
33 class MITKIGT_EXPORT PolhemusTrackingDevice : public TrackingDevice
34 {
35 public:
36
40
46 virtual bool StartTracking() override;
47
52 virtual bool StopTracking() override;
53
58 virtual bool OpenConnection() override;
59
63 virtual bool CloseConnection() override;
64
68 virtual unsigned int GetToolCount() const override;
69
75 TrackingTool* GetTool(unsigned int toolNumber) const override;
76
77
89 mitk::TrackingTool* AddTool(const char* toolName, int toolPort);
90
91
92
93 bool IsDeviceInstalled();
94
96 virtual bool AutoDetectToolsAvailable();
97
102 virtual mitk::NavigationToolStorage::Pointer AutoDetectTools();
103
105 void SetHemisphereTrackingEnabled(bool _HemisphereTrackingEnabled);
106
108 bool GetHemisphereTrackingEnabled(int _tool);
109
111 void ToggleHemisphere(int _tool = -1);
112
114 void SetHemisphere(int _tool, mitk::Vector3D _hemisphere);
115
117 mitk::Vector3D GetHemisphere(int _tool);
118
121 void AdjustHemisphere(int _tool);
122
123 protected:
126
133 bool InternalAddTool(PolhemusTool::Pointer tool);
134
140 void TrackTools();
141
145 std::vector<PolhemusTool::Pointer> GetAllTools();
146
150 PolhemusInterface* GetDevice();
151
152 void ThreadStartTracking();
153
154 std::vector<PolhemusTool::Pointer> m_AllTools;
155 PolhemusInterface::Pointer m_Device;
156 std::thread m_Thread;
158 };
159}//mitk
160#endif
An object of this class represents the interface to Polhemus trackers. All variables with the name "t...
An object of this class represents Polhemus tracking device. You can add tools to this device,...
mitkClassMacro(PolhemusTrackingDevice, TrackingDevice)
std::vector< PolhemusTool::Pointer > m_AllTools
vector holding all tools
PolhemusInterface::Pointer m_Device
represents the interface to the tracking hardware
Interface for all Tracking Devices.
Interface for all Tracking Tools.
IGT Exceptions.