IGSTK
igstkInfiniTrackTracker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkInfiniTrackTracker.h,v $
5  Language: C++
6  Date: $Date: 2011-01-18 21:40:16 $
7  Version: $Revision: 1.3 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 
19 #ifndef __igstkInfiniTrackTracker_h
20 #define __igstkInfiniTrackTracker_h
21 
22 #ifdef _MSC_VER
23 #pragma warning ( disable : 4018 )
24 //Warning about: identifier was truncated to '255' characters in the debug
25 //information (MVC6.0 Debug)
26 #pragma warning( disable : 4284 )
27 #endif
28 
29 
30 #include "igstkTracker.h"
32 
33 struct itkMarkerPos;
34 
35 #include "vector"
36 
37 namespace igstk {
38 
58 {
59 
60 public:
63 
64 public:
65 
67  igstkSetStringMacro (MarkerTemplatesDirectory);
68 
69 protected:
70 
72  InfiniTrackTracker (void);
73 
75  virtual ~InfiniTrackTracker(void);
76 
80  virtual ResultType InternalOpen( void );
81 
85  virtual ResultType InternalClose( void );
86 
90  virtual ResultType InternalReset( void );
91 
95  virtual ResultType InternalStartTracking( void );
96 
100  virtual ResultType InternalStopTracking( void );
101 
102 
106  virtual ResultType InternalUpdateStatus( void );
107 
113 
115  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
116 
130 
137  virtual ResultType ValidateSpecifiedFrequency( double frequencyInHz );
138 
139 
143  const TrackerToolType * trackerTool );
144 
147  const TrackerToolType * trackerTool );
148 
149 private:
150 
152  void* m_Handle;
153 
155  unsigned long long m_u64DeviceSerialNumber;
156 
158  itk::MutexLock::Pointer m_BufferLock;
159 
161  std::vector<itkMarkerPos*>* m_pvecMarkerPos;
162 
164  int m_iProcessed;
165 
167  int m_iAvailable;
168 
170  int m_iInAcquisition;
171 
173  void setNextArrayForAcquisition ();
174 
176  bool setNextArrayForUser ();
177 
179  void acquisitionFinished ();
180 
182  std::string m_MarkerTemplatesDirectory;
183  std::string m_MarkerTemplatesDirectoryToBeSet;
184 
185 
187  struct TrackerToolIdentification
188  {std::string m_TrackerToolName; unsigned long m_u32GeometryID;};
189 
190  std::vector <TrackerToolIdentification> m_vecTrackerToolID;
191 
192 
193 }; // end of class InfiniTrackTracker
194 
195 } // end of namespace igstk
196 
197 #endif //__igstk_InfiniTrackTracker_h_