Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOptitrackTrackingTool.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 OptiTrackTrackingTool_H_HEADER_INCLUDED_
18 #define OptiTrackTrackingTool_H_HEADER_INCLUDED_
19 
20 #include <MitkIGTExports.h>
21 #include <itkMultiThreader.h>
22 #include "itkFastMutexLock.h"
23 #include "mitkTrackingDevice.h"
24 #include "mitkTrackingTool.h"
25 #include "mitkIGTTimeStamp.h"
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include <time.h>
29 #include <itksys/SystemTools.hxx>
30 #include <itkMutexLockHolder.h>
31 #include "mitkCommon.h"
33 #include <mitkVector.h>
34 #include <itkFastMutexLock.h>
35 #include "mitkIGTException.h"
36 
37 
38 
43 
44 
45 namespace mitk
46 {
47 
48  //class OptitrackTragkingDevice;
49 
58  class MITKIGT_EXPORT OptitrackTrackingTool : public InternalTrackingTool
59  {
60  public:
63  itkNewMacro(Self);
64 
65 
66 
80  bool SetToolByFileName(std::string nameFile);
81 
87  int get_IDnext();
88 
94  bool DeleteTrackable();
95 
100  void SetPosition(mitk::Point3D position, ScalarType eps=0.0);
101 
106  void SetOrientation(mitk::Quaternion orientation, ScalarType eps=0.0);
107 
112  void GetPosition(mitk::Point3D& position) const override;
113 
118  void GetOrientation(mitk::Quaternion& orientation) const override;
119 
125  bool Enable() override;
126 
132  bool Disable() override;
133 
139  bool IsEnabled() const override;
140 
146  bool IsDataValid() const override;
147 
153  float GetTrackingError() const override;
154 
159  void SetTrackingError(float FLEerror) override;
160 
165  void SetDataValid(bool _arg) override;
166 
171  void updateTool();
172 
177 
182 
186  std::string m_fileConfiguration;
187 
191  int m_ID;
192 
197 
201  float* m_pivotPoint;
202 
207 
211  float m_FLE;
212 
213  private:
215  const OptitrackTrackingTool& operator=(const OptitrackTrackingTool&);
216 
217  };
218 }
219 #endif /* OptiTrackTrackingTool_H_HEADER_INCLUDED_ */
int m_ID
ID number from Optitrack API.
float * m_calibrationPoints
List of Markers locations in calibration position and orientation.
An object of this class represents the Optitrack device. You can add tools to this device...
double ScalarType
int m_numMarkers
Number of Markers that blong to the tool.
DataCollection - Class to facilitate loading/accessing structured data.
float m_FLE
Expected value of the fiducial localization error (rms)
implements TrackingTool interface
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
An object of this class represents the a Tool tracked by Optitrack System. You can define the tool by...
vnl_quaternion< ScalarType > Quaternion
float * m_pivotPoint
location of the pivot point during calibration
MITKCORE_EXPORT const ScalarType eps
std::string m_fileConfiguration
File of the configuration for the tool.