Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_
18 #define MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_
19 
20 
21 #include <vector>
22 #include <mitkIGTConfig.h>
23 #include <mitkTrackingDevice.h>
24 #include <mitkClaronTool.h>
25 #include <itkMultiThreader.h>
26 
27 //only include MicronTracker if cmake Variable is on else the ClaronInterfaceStub is included
28 #ifdef MITK_USE_MICRON_TRACKER
29 #include <mitkClaronInterface.h>
30 #else
32 #endif
33 
34 namespace mitk
35 {
42  class MITKIGT_EXPORT ClaronTrackingDevice : public TrackingDevice
43  {
44  public:
45 
47  itkFactorylessNewMacro(Self)
48  itkCloneMacro(Self)
49 
50 
53  virtual bool IsDeviceInstalled() override;
54 
60  virtual bool StartTracking() override;
61 
66  virtual bool StopTracking() override;
67 
72  virtual bool OpenConnection() override;
73 
77  virtual bool CloseConnection() override;
78 
82  virtual unsigned int GetToolCount() const override;
83 
89  TrackingTool* GetTool(unsigned int toolNumber) const override;
90 
91 
103  mitk::TrackingTool* AddTool(const char* toolName, const char* fileName);
104 
105 
111  DEPRECATED(bool IsMicronTrackerInstalled());
112 
114  itkSetMacro(CalibrationDir,std::string);
115 
117  itkGetMacro(CalibrationDir,std::string);
118 
119  protected:
122 
129  bool InternalAddTool(ClaronTool::Pointer tool);
130 
136  void TrackTools();
137 
144  std::vector<ClaronTool::Pointer> DetectTools();
145 
149  std::vector<ClaronTool::Pointer> GetAllTools();
150 
154  ClaronInterface* GetDevice();
155 
156  static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);
157 
158  std::vector<ClaronTool::Pointer> m_AllTools;
162 
164  std::string m_CalibrationDir;
166  std::string m_ToolfilesDir;
167  };
168 }//mitk
169 #endif /* MITKCLARONTRACKINGDEVICE_H_HEADER_INCLUDED_ */
itk::MultiThreader::Pointer m_MultiThreader
Interface for all Tracking Tools.
itk::SmartPointer< Self > Pointer
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:183
An object of this class represents the MicronTracker device. You can add tools to this device...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
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