IGSTK
igstkAscensionTracker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkAscensionTracker.h,v $
5  Language: C++
6  Date: $Date: 2009-02-02 17:32:02 $
7  Version: $Revision: 1.2 $
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 #ifndef __igstkAscensionTracker_h
18 #define __igstkAscensionTracker_h
19 
23 #include "igstkTracker.h"
24 
25 namespace igstk
26 {
38 class AscensionTracker : public Tracker
39 {
40 public:
41 
44 
45 public:
46 
48  typedef igstk::AscensionCommandInterpreter CommandInterpreterType;
49 
52 
55  void SetCommunication( CommunicationType *communication );
56 
58  igstkGetMacro( NumberOfTools, unsigned int );
59 
60 protected:
61 
62  AscensionTracker(void);
63 
64  virtual ~AscensionTracker(void);
65 
68 
70  virtual ResultType InternalOpen( void );
71 
73  virtual ResultType InternalClose( void );
74 
76  virtual ResultType InternalActivateTools( void );
77 
79  virtual ResultType InternalDeactivateTools( void );
80 
82  virtual ResultType InternalStartTracking( void );
83 
85  virtual ResultType InternalStopTracking( void );
86 
88  virtual ResultType InternalUpdateStatus( void );
89 
92  virtual ResultType InternalThreadedUpdateStatus( void );
93 
95  virtual ResultType VerifyTrackerToolInformation(
96  const TrackerToolType * trackerTool );
97 
99  virtual ResultType AddTrackerToolToInternalDataContainers( const
100  TrackerToolType * trackerTool );
101 
104  const TrackerToolType * trackerTool );
105 
107  virtual ResultType InternalReset( void );
108 
110  virtual void PrintSelf( std::ostream& os, ::itk::Indent indent ) const;
111 
112 private:
113 
114  AscensionTracker(const Self&); //purposely not implemented
115  void operator=(const Self&); //purposely not implemented
116 
119  typedef AscensionTrackerToolType::Pointer AscensionTrackerToolPointer;
120  typedef AscensionTrackerToolType::ConstPointer
121  AscensionTrackerToolConstPointer;
122 
125  void EnableToolPorts( void );
126 
128  void DisableToolPorts( void );
129 
131  unsigned int m_NumberOfTools;
132 
134  CommunicationType::Pointer m_Communication;
135 
137  CommandInterpreterType::Pointer m_CommandInterpreter;
138 
140  itk::MutexLock::Pointer m_BufferLock;
141 
143  //TransformType m_TransformBuffer[NumberOfPorts];
144 
146  typedef std::map< std::string, std::vector < double > >
147  TrackerToolTransformContainerType;
148 
149  TrackerToolTransformContainerType m_ToolTransformBuffer;
150 
152  typedef std::map< unsigned int, std::string> ErrorCodeContainerType;
153  static ErrorCodeContainerType m_ErrorCodeContainer;
154 
156  static bool m_ErrorCodeListCreated;
157 
159  std::map< std::string, int > m_ToolStatusContainer;
160 
161 };
162 
163 }
164 
165 #endif //__igstk_AscensionTracker_h_