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_
virtual ResultType InternalReset(void)
The "InternalReset" method resets tracker to a known configuration.
virtual ResultType ValidateSpecifiedFrequency(double frequencyInHz)
The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the tracking d...
virtual ResultType RemoveTrackerToolFromInternalDataContainers(const TrackerToolType *trackerTool)
This method will remove entries of the traceker tool from internal data containers.
virtual ResultType InternalStartTracking(void)
The "InternalStartTracking" method starts tracking.
virtual ResultType InternalThreadedUpdateStatus(void)
The "InternalThreadedUpdateStatus" method updates tracker status.
Provides support for the InfiniTrack optical tracker.
#define igstkStandardClassTraitsMacro(classname, superclassname)
Convenience macro for traits of a non-templated class.
Definition: igstkMacros.h:275
virtual ResultType InternalClose(void)
The "InternalClose" method closes communication with a tracking device.
virtual ResultType InternalStopTracking(void)
The "InternalStopTracking" method stops tracking.
virtual ResultType VerifyTrackerToolInformation(const TrackerToolType *)
Verify if a tracker tool information is correct before attaching it to the tracker.
Abstract superclass for concrete IGSTK Tracker classes.
Definition: igstkTracker.h:96
virtual ResultType InternalUpdateStatus(void)
The "InternalUpdateStatus" method updates tracker status.
virtual ~InfiniTrackTracker(void)
Destructor.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
igstkStandardAbstractClassTraitsMacro(Tracker, Object) public typedef TrackerTool TrackerToolType
Macro with standard traits declarations.
Definition: igstkTracker.h:101
InfiniTrackTracker(void)
Macro with standard traits declarations.
#define igstkSetStringMacro(name)
Set character string.
Definition: igstkMacros.h:157
virtual ResultType InternalOpen(void)
The "InternalOpen" method opens communication with a tracking device.
virtual ResultType AddTrackerToolToInternalDataContainers(const TrackerToolType *trackerTool)
Add tracker tool entry to internal containers.