Medical Imaging Interaction Toolkit  2018.4.99-7e02155b
Medical Imaging Interaction Toolkit
mitkClaronInterface.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 MITKCLARONINTERFACE_H_HEADER_INCLUDED_
14 #define MITKCLARONINTERFACE_H_HEADER_INCLUDED_
15 #define MTC(func) {int r = func; if (r!=mtOK) printf("MTC error: %s\n",MTLastErrorString()); };
16 
17 #include <vector>
18 #include <string>
19 
20 #include <MitkIGTExports.h>
21 #include "mitkCommon.h"
22 
23 #include <itkObject.h>
24 #include <itkObjectFactory.h>
25 
26 #ifdef _WIN64 //Defined for applications for Win64.
27 typedef long mtHandle;
28 #else
29 typedef int mtHandle;
30 #endif
31 
32 namespace mitk
33 {
34  typedef int claronToolHandle;
35 
43  class MITKIGT_EXPORT ClaronInterface : public itk::Object
44  {
45  public:
46 
48  itkFactorylessNewMacro(Self);
49  itkCloneMacro(Self)
55  void Initialize(std::string calibrationDir, std::string toolFilesDir);
56 
61  bool StartTracking();
62 
67  bool StopTracking();
68 
72  std::vector<claronToolHandle> GetAllActiveTools();
73 
77  std::vector<double> GetTipPosition(claronToolHandle c);
78 
82  std::vector<double> GetTipQuaternions(claronToolHandle c);
83 
87  std::vector<double> GetPosition(claronToolHandle c);
88 
92  std::vector<double> GetQuaternions(claronToolHandle c);
93 
98  const char* GetName(claronToolHandle c);
99 
103  void GrabFrame();
104 
108  bool IsTracking();
109 
115  bool IsMicronTrackerInstalled();
116 
117  protected:
121  ClaronInterface();
125  ~ClaronInterface() override;
126 
127 
130 
132  char calibrationDir[512];
134  char markerDir[512];
135 
136  //Some handles to communicate with the MTC library.
141  //------------------------------------------------
142 
143  };
144 }//mitk
145 #endif
int claronToolHandle
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.
#define MITKIGT_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
bool isTracking
Variable is true if the device is tracking at the moment, false if not.
int mtHandle