Medical Imaging Interaction Toolkit  2018.4.99-ef453c4b
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 (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 OptiTrackTrackingTool_H_HEADER_INCLUDED_
14 #define OptiTrackTrackingTool_H_HEADER_INCLUDED_
15 
16 #include <MitkIGTExports.h>
17 #include <itkMultiThreader.h>
18 #include "itkFastMutexLock.h"
19 #include "mitkTrackingDevice.h"
20 #include "mitkTrackingTool.h"
21 #include "mitkIGTTimeStamp.h"
22 #include <cstdlib>
23 #include <cstdio>
24 #include <ctime>
25 #include <itksys/SystemTools.hxx>
26 #include <itkMutexLockHolder.h>
27 #include "mitkCommon.h"
28 #include <mitkTrackingTool.h>
29 #include <mitkVector.h>
30 #include <itkFastMutexLock.h>
31 #include "mitkIGTException.h"
32 
33 
34 
39 
40 
41 namespace mitk
42 {
43 
44  //class OptitrackTrackingDevice;
45 
55  {
56  public:
59  itkNewMacro(Self);
60 
61 
62 
76  bool SetToolByFileName(std::string nameFile);
77 
83  int get_IDnext();
84 
90  bool DeleteTrackable();
91 
96  using Superclass::SetPosition;
97  void SetPosition(mitk::Point3D position, ScalarType eps=0.0);
98 
103  using Superclass::SetOrientation;
104  void SetOrientation(mitk::Quaternion orientation, ScalarType eps=0.0);
105 
110  void GetPosition(mitk::Point3D& position) const override;
111 
116  void GetOrientation(mitk::Quaternion& orientation) const override;
117 
123  bool Enable() override;
124 
130  bool Disable() override;
131 
137  bool IsEnabled() const override;
138 
144  bool IsDataValid() const override;
145 
151  float GetTrackingError() const override;
152 
157  void SetTrackingError(float FLEerror) override;
158 
163  void SetDataValid(bool _arg) override;
164 
169  void updateTool();
170 
175 
179  ~OptitrackTrackingTool() override;
180 
184  std::string m_fileConfiguration;
185 
189  int m_ID;
190 
195 
199  float* m_pivotPoint;
200 
205 
209  float m_FLE;
210 
211  private:
213  const OptitrackTrackingTool& operator=(const OptitrackTrackingTool&);
214 
215  };
216 }
217 #endif /* OptiTrackTrackingTool_H_HEADER_INCLUDED_ */
Interface for all Tracking Tools.
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)
#define MITKIGT_EXPORT
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
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.