MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkClaronInterface.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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.
27typedef long long mtHandle;
28#else
29typedef int mtHandle;
30#endif
31
32namespace mitk
33{
34 typedef int claronToolHandle;
35
43 class MITKIGT_EXPORT ClaronInterface : public itk::Object
44 {
45 public:
46
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:
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
An object of this class represents the interface to the MicronTracker. The methods of this class are ...
bool isTracking
Variable is true if the device is tracking at the moment, false if not.
mitkClassMacroItkParent(ClaronInterface, itk::Object)
int mtHandle
IGT Exceptions.
int claronToolHandle