Medical Imaging Interaction Toolkit  2016.11.0
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,
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 MITKCLARONINTERFACE_H_HEADER_INCLUDED_
18 #define MITKCLARONINTERFACE_H_HEADER_INCLUDED_
19 #define MTC(func) {int r = func; if (r!=mtOK) printf("MTC error: %s\n",MTLastErrorString()); };
20 
21 #include <vector>
22 #include <string>
23 
24 #include <MitkIGTExports.h>
25 #include "mitkCommon.h"
26 
27 #include <itkObject.h>
28 #include <itkObjectFactory.h>
29 
30 #ifdef _WIN64 //Defined for applications for Win64.
31 typedef long mtHandle;
32 #else
33 typedef int mtHandle;
34 #endif
35 
36 namespace mitk
37 {
38  typedef int claronToolHandle;
39 
47  class MITKIGT_EXPORT ClaronInterface : public itk::Object
48  {
49  public:
50 
52  itkFactorylessNewMacro(Self)
53  itkCloneMacro(Self)
59  void Initialize(std::string calibrationDir, std::string toolFilesDir);
60 
65  bool StartTracking();
66 
71  bool StopTracking();
72 
76  std::vector<claronToolHandle> GetAllActiveTools();
77 
81  std::vector<double> GetTipPosition(claronToolHandle c);
82 
86  std::vector<double> GetTipQuaternions(claronToolHandle c);
87 
91  std::vector<double> GetPosition(claronToolHandle c);
92 
96  std::vector<double> GetQuaternions(claronToolHandle c);
97 
102  const char* GetName(claronToolHandle c);
103 
107  void GrabFrame();
108 
112  bool IsTracking();
113 
119  bool IsMicronTrackerInstalled();
120 
121  protected:
125  ClaronInterface();
129  ~ClaronInterface();
130 
131 
134 
136  char calibrationDir[512];
138  char markerDir[512];
139 
140  //Some handles to communicate with the MTC library.
145  //------------------------------------------------
146 
147  };
148 }//mitk
149 #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 mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
bool isTracking
Variable is true if the device is tracking at the moment, false if not.
static std::string GetName(std::string fileName, std::string suffix)
int mtHandle