Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
14 #define mitkClaronInterface_h
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 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
mitk::ClaronInterface::isTracking
bool isTracking
Variable is true if the device is tracking at the moment, false if not.
Definition: mitkClaronInterface.h:129
mtHandle
int mtHandle
Definition: mitkClaronInterface.h:29
mitk::ClaronInterface
An object of this class represents the interface to the MicronTracker. The methods of this class are ...
Definition: mitkClaronInterface.h:43
mitk::ClaronInterface::CurrCamera
mtHandle CurrCamera
Definition: mitkClaronInterface.h:139
mitk::claronToolHandle
int claronToolHandle
Definition: mitkClaronInterface.h:34
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk::ClaronInterface::PoseXf
mtHandle PoseXf
Definition: mitkClaronInterface.h:138
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkCommon.h
mitk::ClaronInterface::IdentifiedMarkers
mtHandle IdentifiedMarkers
Definition: mitkClaronInterface.h:137
mitk::ClaronInterface::IdentifyingCamera
mtHandle IdentifyingCamera
Definition: mitkClaronInterface.h:140