Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPolhemusTrackingDevice.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKPolhemusTRACKINGDEVICE_H_HEADER_INCLUDED_
14 #define MITKPolhemusTRACKINGDEVICE_H_HEADER_INCLUDED_
15 
16 
17 #include <vector>
18 #include <mitkIGTConfig.h>
19 #include <mitkTrackingDevice.h>
20 #include <mitkPolhemusTool.h>
21 #include <itkMultiThreader.h>
22 
23 namespace mitk
24 {
34  {
35  public:
36 
38  itkFactorylessNewMacro(Self)
39  itkCloneMacro(Self)
40 
41 
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  static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);
153 
154  std::vector<PolhemusTool::Pointer> m_AllTools;
155  PolhemusInterface::Pointer m_Device;
156  itk::MultiThreader::Pointer m_MultiThreader;
159  };
160 }//mitk
161 #endif /* MITKPolhemusTRACKINGDEVICE_H_HEADER_INCLUDED_ */
An object of this class represents the interface to Polhemus trackers. All variables with the name "t...
Interface for all Tracking Tools.
An object of this class represents Polhemus tracking device. You can add tools to this device...
DataCollection - Class to facilitate loading/accessing structured data.
PolhemusInterface::Pointer m_Device
represents the interface to the tracking hardware
std::vector< PolhemusTool::Pointer > m_AllTools
vector holding all tools
#define MITKIGT_EXPORT
itk::MultiThreader::Pointer m_MultiThreader
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Interface for all Tracking Devices.