IGSTK
igstkAuroraTrackerTool.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkAuroraTrackerTool.h,v $
5  Language: C++
6  Date: $Date: 2008-11-05 19:37:29 $
7  Version: $Revision: 1.18 $
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 __igstkAuroraTrackerTool_h
19 #define __igstkAuroraTrackerTool_h
20 
21 #include "igstkTrackerTool.h"
22 
23 namespace igstk
24 {
25 
26 igstkEventMacro( AuroraTrackerToolEvent,StringEvent);
27 igstkEventMacro( AuroraTrackerToolErrorEvent, TrackerToolErrorEvent);
28 igstkEventMacro( InvalidAuroraPortNumberErrorEvent,
29  AuroraTrackerToolErrorEvent);
30 igstkEventMacro( InvalidAuroraSROMFilenameErrorEvent,
31  AuroraTrackerToolErrorEvent);
32 igstkEventMacro( InvalidAuroraPartNumberErrorEvent,
33  AuroraTrackerToolErrorEvent);
34 igstkEventMacro( InvalidAuroraChannelNumberErrorEvent,
35  AuroraTrackerToolErrorEvent);
36 
37 class AuroraTracker;
38 
51 {
52 public:
53 
56 
57 
60  void RequestSetPortNumber( unsigned int portNumber );
61 
63  void RequestSetChannelNumber( unsigned int channelNumber );
64 
66  void RequestSetSROMFileName( const std::string & filename );
67 
69  void RequestSetPartNumber( const std::string & toolId );
70 
73 
76 
78  bool IsSROMFileNameSpecified() const;
79 
81  bool IsPartNumberSpecified() const;
82 
84  igstkGetStringMacro( SROMFileName );
85 
87  igstkGetMacro( PortNumber, unsigned int );
88 
90  igstkGetMacro( ChannelNumber, unsigned int );
91 
93  igstkGetStringMacro( PartNumber );
94 
97  bool IsTrackerTool5DOF() const;
98 
99 protected:
100 
102  virtual ~AuroraTrackerTool();
103 
105  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
106 
107 private:
108 
110  void SetPortNumberProcessing( );
111 
113  void ReportInValidPortNumberSpecifiedProcessing( );
114 
116  void SetChannelNumberProcessing( );
117 
119  void ReportInValidChannelNumberSpecifiedProcessing( );
120 
122  void SetSROMFileNameProcessing( );
123 
125  void ReportInValidSROMFileSpecifiedProcessing( );
126 
128  void SetPartNumberProcessing( );
129 
131  void ReportInValidPartNumberSpecifiedProcessing( );
132 
134  void Report5DOFTrackerToolSelectedProcessing();
135 
137  void Report6DOFTrackerToolSelectedProcessing();
138 
139  AuroraTrackerTool(const Self&); //purposely not implemented
140  void operator=(const Self&); //purposely not implemented
141 
144  virtual bool CheckIfTrackerToolIsConfigured() const;
145 
147  igstkDeclareStateMacro( Idle );
148  igstkDeclareStateMacro( 5DOFTrackerToolSelected );
149  igstkDeclareStateMacro( 6DOFTrackerToolSelected );
150  igstkDeclareStateMacro( 5DOFTrackerToolPortNumberSpecified );
151  igstkDeclareStateMacro( 6DOFTrackerToolPortNumberSpecified );
152  igstkDeclareStateMacro( 5DOFTrackerToolChannelNumberSpecified );
153  igstkDeclareStateMacro( 5DOFTrackerToolSROMFileNameSpecified );
154  igstkDeclareStateMacro( 6DOFTrackerToolSROMFileNameSpecified );
155  igstkDeclareStateMacro( 5DOFTrackerToolPartNumberSpecified );
156  igstkDeclareStateMacro( 6DOFTrackerToolPartNumberSpecified );
157 
158 
160  igstkDeclareInputMacro( Select5DOFTrackerTool );
161  igstkDeclareInputMacro( Select6DOFTrackerTool );
162  igstkDeclareInputMacro( ValidPortNumber );
163  igstkDeclareInputMacro( InValidPortNumber );
164  igstkDeclareInputMacro( ValidChannelNumber );
165  igstkDeclareInputMacro( InValidChannelNumber );
166  igstkDeclareInputMacro( ValidSROMFileName );
167  igstkDeclareInputMacro( InValidSROMFileName );
168  igstkDeclareInputMacro( ValidPartNumber);
169  igstkDeclareInputMacro( InValidPartNumber);
170 
172  unsigned int m_PortNumberToBeSet;
173  unsigned int m_PortNumber;
174 
176  unsigned int m_ChannelNumberToBeSet;
177  unsigned int m_ChannelNumber;
178 
180  std::string m_SROMFileNameToBeSet;
181  std::string m_SROMFileName;
182 
184  std::string m_PartNumberToBeSet;
185  std::string m_PartNumber;
186 
187  bool m_TrackerToolConfigured;
188  bool m_PartNumberSpecified;
189  bool m_SROMFileNameSpecified;
190  bool m_ChannelNumberSpecified;
191 
192  bool m_FiveDOFTrackerToolSelected;
193 
194 };
195 
196 
197 } // namespace igstk
198 
199 
200 #endif // __igstk_AuroraTrackerTool_h_
void RequestSetPartNumber(const std::string &toolId)
Request set the PartNumber.
#define igstkGetMacro(name, type)
Get built-in type.
Definition: igstkMacros.h:105
Base class for all the IGSTK classes.
Definition: igstkObject.h:40
void RequestSetChannelNumber(unsigned int channelNumber)
Request set the channel number.
bool IsPartNumberSpecified() const
Check if Part number is specified.
igstkEventMacro(AuroraTrackerToolEvent, StringEvent)
bool IsTrackerTool5DOF() const
Check if the tracker tool selected is 5DOF or 6DOF (five or six degrees of freedom) ...
void RequestSetSROMFileName(const std::string &filename)
Request set the SROM file name.
void RequestSelect5DOFTrackerTool()
Request select 5DOF (five degrees of freedom) tracker tool.
bool IsSROMFileNameSpecified() const
Check if SROM file name specified.
Abstract superclass for concrete IGSTK TrackerTool classes.
igstkGetStringMacro(SROMFileName)
Get SROM file name.
igstkStandardClassTraitsMacro(AuroraTrackerTool, TrackerTool) void RequestSetPortNumber(unsigned int portNumber)
Macro with standard traits declarations.
An Aurora-specific TrackerTool class.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print object information.
void RequestSelect6DOFTrackerTool()
Request select 6DOF (six degrees of freedom) tracker tool.