Medical Imaging Interaction Toolkit  2018.4.99-eed36131
Medical Imaging Interaction Toolkit
mitkClaronTrackingDevice.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 MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_
14 #define MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_
15 
16 
17 #include <vector>
18 #include <mitkIGTConfig.h>
19 #include <mitkTrackingDevice.h>
20 #include <mitkClaronTool.h>
21 #include <itkMultiThreader.h>
22 
23 //only include MicronTracker if cmake Variable is on else the ClaronInterfaceStub is included
24 #ifdef MITK_USE_MICRON_TRACKER
25 #include <mitkClaronInterface.h>
26 #else
28 #endif
29 
30 namespace mitk
31 {
39  {
40  public:
41 
43  itkFactorylessNewMacro(Self);
44  itkCloneMacro(Self);
45 
49  bool IsDeviceInstalled() override;
50 
56  bool StartTracking() override;
57 
62  bool StopTracking() override;
63 
68  bool OpenConnection() override;
69 
73  bool CloseConnection() override;
74 
78  unsigned int GetToolCount() const override;
79 
85  TrackingTool* GetTool(unsigned int toolNumber) const override;
86 
87 
99  mitk::TrackingTool* AddTool(const char* toolName, const char* fileName);
100 
101 
107  DEPRECATED(bool IsMicronTrackerInstalled());
108 
110  itkSetMacro(CalibrationDir,std::string);
111 
113  itkGetMacro(CalibrationDir,std::string);
114 
115  protected:
117  ~ClaronTrackingDevice() override;
118 
125  bool InternalAddTool(ClaronTool::Pointer tool);
126 
132  void TrackTools();
133 
140  std::vector<ClaronTool::Pointer> DetectTools();
141 
145  std::vector<ClaronTool::Pointer> GetAllTools();
146 
150  ClaronInterface* GetDevice();
151 
152  static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);
153 
154  std::vector<ClaronTool::Pointer> m_AllTools;
155  ClaronInterface::Pointer m_Device;
156  itk::MultiThreader::Pointer m_MultiThreader;
158 
160  std::string m_CalibrationDir;
162  std::string m_ToolfilesDir;
163  };
164 }//mitk
165 #endif /* MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_ */
itk::MultiThreader::Pointer m_MultiThreader
Interface for all Tracking Tools.
std::string m_ToolfilesDir
The directory where the tool calibration files can be found.
An object of this class represents the interface to the MicronTracker. The methods of this class are ...
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< ClaronTool::Pointer > m_AllTools
vector holding all tools
#define DEPRECATED(func)
Definition: mitkCommon.h:179
An object of this class represents the MicronTracker device. You can add tools to this device...
#define MITKIGT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Interface for all Tracking Devices.
std::string m_CalibrationDir
The directory where the camera calibration files can be found.
ClaronInterface::Pointer m_Device
represents the interface to the tracking hardware