IGSTK
/build/buildd/igstk-4.4.0/Source/igstkInfiniTrackTracker.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Image Guided Surgery Software Toolkit
00004   Module:    $RCSfile: igstkInfiniTrackTracker.h,v $
00005   Language:  C++
00006   Date:      $Date: 2011-01-18 21:40:16 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
00010   See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 
00019 #ifndef __igstkInfiniTrackTracker_h
00020 #define __igstkInfiniTrackTracker_h
00021 
00022 #ifdef _MSC_VER
00023 #pragma warning ( disable : 4018 )
00024 //Warning about: identifier was truncated to '255' characters in the debug
00025 //information (MVC6.0 Debug)
00026 #pragma warning( disable : 4284 )
00027 #endif
00028 
00029 
00030 #include "igstkTracker.h"
00031 #include "igstkInfiniTrackTrackerTool.h"
00032 
00033 struct itkMarkerPos;
00034 
00035 #include "vector"
00036 
00037 namespace igstk {
00038         
00057 class InfiniTrackTracker : public Tracker
00058 {
00059 
00060 public:
00062   igstkStandardClassTraitsMacro(InfiniTrackTracker, Tracker)
00063 
00064 public:
00065 
00067   igstkSetStringMacro (MarkerTemplatesDirectory);
00068 
00069 protected:
00070 
00072   InfiniTrackTracker (void);
00073 
00075   virtual ~InfiniTrackTracker(void);
00076 
00080   virtual ResultType InternalOpen( void );
00081 
00085   virtual ResultType InternalClose( void );
00086 
00090   virtual ResultType InternalReset( void );
00091 
00095   virtual ResultType InternalStartTracking( void );
00096 
00100   virtual ResultType InternalStopTracking( void );
00101 
00102 
00106   virtual ResultType InternalUpdateStatus( void );
00107 
00112   virtual ResultType InternalThreadedUpdateStatus( void );
00113 
00115   virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 
00116 
00129   virtual ResultType VerifyTrackerToolInformation ( const TrackerToolType * ); 
00130 
00137   virtual ResultType ValidateSpecifiedFrequency( double frequencyInHz );
00138 
00139 
00142   virtual ResultType RemoveTrackerToolFromInternalDataContainers(
00143             const TrackerToolType * trackerTool ); 
00144 
00146   virtual ResultType AddTrackerToolToInternalDataContainers(
00147             const TrackerToolType * trackerTool );
00148 
00149 private:
00150 
00152   void* m_Handle;
00153 
00155   unsigned long long m_u64DeviceSerialNumber;
00156 
00158   itk::MutexLock::Pointer  m_BufferLock;
00159 
00161   std::vector<itkMarkerPos*>* m_pvecMarkerPos;
00162 
00164   int m_iProcessed;
00165 
00167   int m_iAvailable;
00168 
00170   int m_iInAcquisition;
00171 
00173   void setNextArrayForAcquisition ();
00174 
00176   bool setNextArrayForUser ();
00177 
00179   void acquisitionFinished ();
00180 
00182   std::string m_MarkerTemplatesDirectory;
00183   std::string m_MarkerTemplatesDirectoryToBeSet;
00184 
00185 
00187   struct TrackerToolIdentification 
00188     {std::string m_TrackerToolName; unsigned long m_u32GeometryID;}; 
00189 
00190   std::vector <TrackerToolIdentification> m_vecTrackerToolID;
00191 
00192 
00193 }; // end of class InfiniTrackTracker
00194 
00195 } // end of namespace igstk
00196 
00197 #endif //__igstk_InfiniTrackTracker_h_