/usr/include/IGSTK/igstkTrackerTool.h is in libigstk4-dev 4.4.0-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | /*=========================================================================
Program: Image Guided Surgery Software Toolkit
Module: $RCSfile: igstkTrackerTool.h,v $
Language: C++
Date: $Date: 2008-11-17 20:12:26 $
Version: $Revision: 1.32 $
Copyright (c) ISC Insight Software Consortium. All rights reserved.
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __igstkTrackerTool_h
#define __igstkTrackerTool_h
#include "igstkObject.h"
#include "igstkTransform.h"
#include "igstkMacros.h"
#include "igstkStateMachine.h"
#include "igstkCoordinateSystemInterfaceMacros.h"
namespace igstk
{
igstkEventMacro( TrackerToolEvent, StringEvent);
igstkEventMacro( TrackerToolErrorEvent, IGSTKErrorWithStringEvent);
igstkEventMacro( TrackerToolConfigurationEvent,TrackerToolEvent);
igstkEventMacro( TrackerToolConfigurationErrorEvent,TrackerToolErrorEvent);
igstkEventMacro( InvalidRequestToAttachTrackerToolErrorEvent,
TrackerToolErrorEvent);
igstkEventMacro( InvalidRequestToDetachTrackerToolErrorEvent,
TrackerToolErrorEvent);
igstkEventMacro( TrackerToolAttachmentToTrackerEvent,TrackerToolEvent);
igstkEventMacro( TrackerToolAttachmentToTrackerErrorEvent,
TrackerToolErrorEvent);
igstkEventMacro( TrackerToolDetachmentFromTrackerEvent,TrackerToolEvent);
igstkEventMacro( TrackerToolDetachmentFromTrackerErrorEvent,
TrackerToolErrorEvent);
igstkEventMacro( TrackerToolMadeTransitionToTrackedStateEvent,
TrackerToolEvent);
igstkEventMacro( TrackerToolNotAvailableToBeTrackedEvent,TrackerToolEvent);
igstkEventMacro( ToolTrackingStartedEvent,TrackerToolEvent);
igstkEventMacro( ToolTrackingStoppedEvent,TrackerToolEvent);
class Tracker;
/** \class TrackerTool
* \brief Abstract superclass for concrete IGSTK TrackerTool classes.
*
* This class provides a generic implementation of a tool of
* a tracker. This may contain hardware specific details of
* the tool, along with the fields for position, orientation
* and error associated with the measurement used.
*
*
* \image html igstkDummyTrackerTool.png "TrackerTool State Machine Diagram"
* \image latex igstkDummyTrackerTool.eps "TrackerTool State Machine Diagram"
*
* \ingroup Tracker
*
*/
class TrackerTool : public Object
{
public:
/** Macro with standard traits declarations. */
igstkStandardAbstractClassTraitsMacro( TrackerTool, Object )
public:
igstkFriendClassMacro( Tracker );
typedef Tracker TrackerType;
typedef Transform TransformType;
/** Get the calibration transform for this tool. */
igstkGetMacro( CalibrationTransform, TransformType );
/** Set the calibration transform for this tool. */
void SetCalibrationTransform( const TransformType & );
/** Get whether the tool was updated during tracker UpdateStatus() */
igstkGetMacro( Updated, bool );
/** The "RequestConfigure" method attempts to configure the tracker tool */
virtual void RequestConfigure( void );
/** The "RequestDetachFromTracker" method detaches the tracker tool from the
* tracker. */
virtual void RequestDetachFromTracker( );
/** Access the unique identifier to the tracker tool */
const std::string GetTrackerToolIdentifier( ) const;
/** The "RequestAttachToTracker" method attaches the tracker tool to a
* tracker. */
virtual void RequestAttachToTracker( TrackerType * );
protected:
TrackerTool(void);
virtual ~TrackerTool(void);
/** Print the object information in a stream. */
virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
/** Set a unique identifier to the tracker tool */
void SetTrackerToolIdentifier( const std::string identifier );
private:
TrackerTool(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
/** Push TrackingStarted input to the tracker tool */
virtual void RequestReportTrackingStarted( );
/** Push TrackingStopped input to the tracker tool */
virtual void RequestReportTrackingStopped( );
/** Push TrackerToolNotAvailable input to the tracker tool */
virtual void RequestReportTrackingToolNotAvailable( );
/** Push TrackerToolVisible input to the tracker tool */
virtual void RequestReportTrackingToolVisible( );
/** Push AttachmentToTrackerSuccess input to the tracker tool*/
void RequestReportSuccessfulTrackerToolAttachment();
/** Push AttachmentToTrackerFailure input to the tracker tool*/
void RequestReportFailedTrackerToolAttachment();
/** Get the raw transform for this tool. */
igstkGetMacro( RawTransform, TransformType );
/** Set the raw transform for this tool. */
void SetRawTransform( const TransformType & );
/** Set the calibrated raw transform for this tool. */
void SetCalibratedTransform( const TransformType & );
/** Set whether the tool was updated during tracker UpdateStatus() */
igstkSetMacro( Updated, bool );
/** Check if the tracker tool is configured or not. This method should
* be implemented in the derived classes. */
virtual bool CheckIfTrackerToolIsConfigured( ) const = 0;
/** Inputs to the State Machine */
igstkDeclareInputMacro( ConfigureTool );
igstkDeclareInputMacro( ToolConfigurationSuccess );
igstkDeclareInputMacro( ToolConfigurationFailure );
igstkDeclareInputMacro( AttachToolToTracker );
igstkDeclareInputMacro( TrackingStarted );
igstkDeclareInputMacro( TrackingStopped );
igstkDeclareInputMacro( TrackerToolNotAvailable );
igstkDeclareInputMacro( TrackerToolVisible );
igstkDeclareInputMacro( DetachTrackerToolFromTracker );
igstkDeclareInputMacro( AttachmentToTrackerSuccess );
igstkDeclareInputMacro( AttachmentToTrackerFailure );
igstkDeclareInputMacro( DetachmentFromTrackerSuccess );
igstkDeclareInputMacro( DetachmentFromTrackerFailure );
/** States for the State Machine */
igstkDeclareStateMacro( Idle );
igstkDeclareStateMacro( AttemptingToConfigureTrackerTool );
igstkDeclareStateMacro( Configured );
igstkDeclareStateMacro( AttemptingToAttachTrackerToolToTracker );
igstkDeclareStateMacro( Attached );
igstkDeclareStateMacro( AttemptingToDetachTrackerToolFromTracker );
igstkDeclareStateMacro( NotAvailable );
igstkDeclareStateMacro( Tracked );
/** Attempt method to configure */
void AttemptToConfigureProcessing( void );
/** Attempt method to attach tracker tool to the tracker */
void AttemptToAttachTrackerToolToTrackerProcessing( void );
/** Post-processing after a successful tracker tool configuration */
void TrackerToolConfigurationSuccessProcessing( void );
/** Post-processing after a failed tracker tool configuration */
void TrackerToolConfigurationFailureProcessing( void );
/** Post-processing after a successful tracker tool to tracker
attachment attempt . */
void TrackerToolAttachmentToTrackerSuccessProcessing( void );
/** Post-processing after a failed attachment attempt . */
void TrackerToolAttachmentToTrackerFailureProcessing( void );
/** Attempt method to detach tracker tool from the tracker */
void AttemptToDetachTrackerToolFromTrackerProcessing( void );
/** Post-processing after a successful detachment of the tracker tool
* from the tracker. */
void TrackerToolDetachmentFromTrackerSuccessProcessing( void );
/** Post-processing after a failed detachment attempt . */
void TrackerToolDetachmentFromTrackerFailureProcessing( void );
/** Report tracker tool is in visible state. */
void ReportTrackerToolVisibleStateProcessing( void );
/** Report tracker tool not available state. */
void ReportTrackerToolNotAvailableProcessing( void );
/** Report tracking started */
void ReportTrackingStartedProcessing( void );
/** Report tracking stopped */
void ReportTrackingStoppedProcessing( void );
/** Report invalid request */
void ReportInvalidRequestProcessing( void );
/** Report invalid request to attach the tracker tool. */
void ReportInvalidRequestToAttachTrackerToolProcessing( void );
/** Report invalid request to detach the tracker tool. */
void ReportInvalidRequestToDetachTrackerToolProcessing( void );
/** No operation for state machine transition */
void NoProcessing( void );
/** Calibration transform for the tool */
TransformType m_CalibrationTransform;
/** Calibrated raw transform for the tool */
TransformType m_CalibratedTransform;
/** raw transform for the tool */
TransformType m_RawTransform;
/** Updated flag */
bool m_Updated;
/** Unique identifier of the tracker tool */
std::string m_TrackerToolIdentifier;
/** Tracker to which the tool will be attached to */
Tracker * m_TrackerToAttachTo;
/** Define the coordinate system interface
*/
igstkCoordinateSystemClassInterfaceMacro();
/** Helper coordinate system used point of reference
* for the calibration Transform. */
CoordinateSystem::Pointer m_CalibrationCoordinateSystem;
};
std::ostream& operator<<(std::ostream& os, const TrackerTool& o);
}
#endif //__igstk_TrackerTool_h_
|