IGSTK
igstkNDITracker.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkNDITracker.h,v $
5  Language: C++
6  Date: $Date: 2008-11-17 20:12:25 $
7  Version: $Revision: 1.4 $
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 #ifndef __igstkNDITracker_h
19 #define __igstkNDITracker_h
20 
23 #include "igstkTrackerTool.h"
24 #include "igstkTracker.h"
25 
26 namespace igstk
27 {
35 class NDITracker : public Tracker
36 {
37 public:
38 
41 
42 public:
43 
45  typedef igstk::SerialCommunication CommunicationType;
46 
49  void SetCommunication( CommunicationType *communication );
50 
51 protected:
52 
53  NDITracker(void);
54 
55  virtual ~NDITracker(void);
56 
59 
62 
64  virtual ResultType InternalOpen( void );
65 
67  virtual ResultType InternalClose( void );
68 
70  virtual ResultType InternalStartTracking( void );
71 
73  virtual ResultType InternalStopTracking( void );
74 
76  virtual ResultType InternalUpdateStatus( void );
77 
81 
83  virtual ResultType InternalReset( void );
84 
86  virtual ResultType
88 
91  virtual ResultType ValidateSpecifiedFrequency( double frequencyInHz );
92 
95  const TrackerToolType * trackerTool );
96 
99  const TrackerToolType * trackerTool );
100 
102  virtual void PrintSelf( std::ostream& os, ::itk::Indent indent ) const;
103 
107 
110 
112  igstkSetMacro( PortHandleToBeAdded, int );
113 
114 private:
115 
116  NDITracker(const Self&); //purposely not implemented
117  void operator=(const Self&); //purposely not implemented
118 
120  ::itk::MutexLock::Pointer m_BufferLock;
121 
123  CommunicationType::Pointer m_Communication;
124 
126  CommunicationType::BaudRateType m_BaudRate;
127 
129  CommandInterpreterType::Pointer m_CommandInterpreter;
130 
133  typedef std::string PortIdentifierType;
134  typedef std::map< PortIdentifierType, int > PortHandleContainerType;
135  PortHandleContainerType m_PortHandleContainer;
136 
138  typedef std::map< std::string, int > ToolAbsentStatusContainerType;
139  ToolAbsentStatusContainerType m_ToolAbsentStatusContainer;
140 
142  typedef std::map< std::string, int > ToolStatusContainerType;
143  ToolStatusContainerType m_ToolStatusContainer;
144 
146  typedef std::vector < double > InternalTransformType;
147  typedef std::map< std::string , InternalTransformType >
148  TrackerToolTransformContainerType;
149 
150  TrackerToolTransformContainerType m_ToolTransformBuffer;
151 
153  int m_PortHandleToBeAdded;
154 
155 };
156 
157 }
158 
159 #endif //__igstk_NDITracker_h_