IGSTK
|
Abstract superclass for concrete IGSTK Tracker classes. More...
#include <igstkTracker.h>
Public Member Functions | |
void | RequestOpen (void) |
The "RequestOpen" method attempts to open communication with the tracking device. | |
void | RequestClose (void) |
The "RequestClose" method closes communication with the device. | |
void | RequestReset (void) |
The "RequestReset" tracker method should be used to bring the tracker | |
void | RequestStartTracking (void) |
The "RequestStartTracking" method readies the tracker for tracking the | |
void | RequestStopTracking (void) |
The "RequestStopTracking" stops tracker from tracking the tools. | |
void | RequestSetFrequency (double frequencyInHz) |
The "RequestSetFrequency" method defines the frequency at which the Transform information will be queried from the Tracker device. | |
void | RequestSetReferenceTool (TrackerToolType *trackerTool) |
Set a reference tracker tool. | |
virtual void | SetThreadingEnabled (bool _arg) |
SetThreadingEnabled(bool) : set m_ThreadingEnabled value. | |
virtual bool | GetThreadingEnabled () |
GetThreadingEnabled(bool) : get m_ThreadingEnabled value. | |
![]() | |
virtual const char * | GetNameOfClass () const |
void | SetLogger (LoggerType *logger) |
Connect the Logger for this class. | |
void | RemoveObserver (unsigned long tag) const |
Public Attributes | |
igstkStandardAbstractClassTraitsMacro(Tracker, Object) public typedef TrackerTool | TrackerToolType |
Macro with standard traits declarations. |
Protected Types | |
enum | ResultType { FAILURE = 0, SUCCESS } |
typedef Transform::TimePeriodType | TimePeriodType |
typedef for times used by the tracker | |
typedef Transform | TransformType |
typedefs from Transform class | |
typedef std::map< std::string, TrackerToolType * > | TrackerToolsContainerType |
typedefs from TrackerTool class |
Protected Member Functions | |
Tracker (void) | |
virtual | ~Tracker (void) |
virtual TimePeriodType | GetValidityTime () |
Get the validity time. | |
virtual ResultType | InternalOpen (void)=0 |
The "InternalOpen" method opens communication with a tracking device. | |
virtual ResultType | InternalClose (void)=0 |
The "InternalClose" method closes communication with a tracking device. | |
virtual ResultType | InternalReset (void)=0 |
The "InternalReset" method resets tracker to a known configuration. | |
virtual ResultType | InternalStartTracking (void)=0 |
The "InternalStartTracking" method starts tracking. | |
virtual ResultType | InternalStopTracking (void)=0 |
The "InternalStopTracking" method stops tracking. | |
virtual ResultType | InternalUpdateStatus (void)=0 |
The "InternalUpdateStatus" method updates tracker status. | |
virtual ResultType | InternalThreadedUpdateStatus (void)=0 |
The "InternalThreadedUpdateStatus" method updates tracker status. | |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Print the object information in a stream. | |
virtual ResultType | VerifyTrackerToolInformation (const TrackerToolType *)=0 |
Verify if a tracker tool information is correct before attaching it to the tracker. | |
virtual ResultType | ValidateSpecifiedFrequency (double frequencyInHz) |
The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the tracking device that is being used. | |
virtual ResultType | RemoveTrackerToolFromInternalDataContainers (const TrackerToolType *trackerTool)=0 |
This method will remove entries of the traceker tool from internal data containers. | |
virtual ResultType | AddTrackerToolToInternalDataContainers (const TrackerToolType *trackerTool)=0 |
Add tracker tool entry to internal containers. | |
const TrackerToolsContainerType & | GetTrackerToolContainer () const |
Access method for the tracker tool container. | |
void | ReportTrackingToolNotAvailable (TrackerToolType *trackerTool) const |
Report to tracker tool that it is not available for tracking. | |
void | ReportTrackingToolVisible (TrackerToolType *trackerTool) const |
Report to tracker tool that it is visible. | |
void | SetTrackerToolRawTransform (TrackerToolType *trackerTool, const TransformType transform) |
Set tracker tool raw transform. | |
void | SetTrackerToolTransformUpdate (TrackerToolType *trackerTool, bool flag) const |
Turn on/off update flag of the tracker tool. | |
void | ExitTrackingStateProcessing (void) |
Depending on the tracker type, the tracking thread should be terminated or left untouched when we stop tracking. | |
void | ExitTrackingWithoutTerminatingTrackingThread () |
Exit tracking without terminating tracking thread. | |
void | ExitTrackingTerminatingTrackingThread () |
Exit tracking after terminating tracking thread. | |
![]() | |
LoggerType * | GetLogger () const |
Object (void) | |
Constructor is protected in order to enforce the use of the New() operator. | |
virtual | ~Object (void) |
void | RegisterObservedObject (const ::igstk::Object *object, unsigned long tag) |
Register observed objects in an internal array so that they can be disconnected upon destruction. | |
void | RemoveFromObservedObjects () |
Remove observers that this object may have connected to other objects. |
Additional Inherited Members | |
![]() | |
typedef Object | Self |
General Typedefs. | |
typedef ::itk::Object | Superclass |
typedef ::itk::SmartPointer< Self > | Pointer |
typedef ::itk::SmartPointer < const Self > | ConstPointer |
typedef igstk::Logger | LoggerType |
![]() | |
static Pointer | New (void) |
Abstract superclass for concrete IGSTK Tracker classes.
This class presents a generic interface for tracking the positions of objects in IGSTK. The various derived subclasses of this class provide back-ends that communicate with several of the tracking systems that are available on the market.
The state machine of this class implements the basic state transitions of a tracker. Inputs to the state machine are translated into method calls that can be overridden by device-specific derive classes that do the appropriate processing for a particular device.
Most (but not all) of the derived classes utilize a communication object to mediate all communication between the computer and the device. When a communication object is used, all communication can be logged, and furthermore, the communication log can be used to drive an offline simulation of a particular device (See SerialCommunicationSimulator).
The following diagram illustrates the state machine of the tracker class
Definition at line 96 of file igstkTracker.h.
|
protected |
typedef for times used by the tracker
Definition at line 154 of file igstkTracker.h.
|
protected |
typedefs from Transform class
Definition at line 166 of file igstkTracker.h.
|
protected |
typedefs from TrackerTool class
Definition at line 241 of file igstkTracker.h.
|
protected |
Definition at line 159 of file igstkTracker.h.
|
protected |
|
protectedvirtual |
void igstk::Tracker::RequestOpen | ( | void | ) |
The "RequestOpen" method attempts to open communication with the tracking device.
It generates a TrackerOpenEvent if successful, or a TrackerOpenErrorEvent if not successful.
void igstk::Tracker::RequestClose | ( | void | ) |
The "RequestClose" method closes communication with the device.
It generates a TrackerCloseEvent if successful, or a TrackerCloseErrorEvent if not successful.
void igstk::Tracker::RequestReset | ( | void | ) |
The "RequestReset" tracker method should be used to bring the tracker
to some defined default state.
void igstk::Tracker::RequestStartTracking | ( | void | ) |
The "RequestStartTracking" method readies the tracker for tracking the
tools connected to the tracker.
void igstk::Tracker::RequestStopTracking | ( | void | ) |
The "RequestStopTracking" stops tracker from tracking the tools.
void igstk::Tracker::RequestSetFrequency | ( | double | frequencyInHz | ) |
The "RequestSetFrequency" method defines the frequency at which the Transform information will be queried from the Tracker device.
Note that Tracker devices have their own internal frequency rate, and if you set here a frequency that is higher than what the Tracker device is capable to follow, then you will start receiving transforms with repeated values.
void igstk::Tracker::RequestSetReferenceTool | ( | TrackerToolType * | trackerTool | ) |
Set a reference tracker tool.
|
virtual |
SetThreadingEnabled(bool) : set m_ThreadingEnabled value.
|
virtual |
GetThreadingEnabled(bool) : get m_ThreadingEnabled value.
|
protectedvirtual |
Get the validity time.
|
protectedpure virtual |
The "InternalOpen" method opens communication with a tracking device.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::CircularSimulatedTracker, igstk::SimulatedTracker, igstk::MouseTracker, and igstk::QMouseTracker.
|
protectedpure virtual |
The "InternalClose" method closes communication with a tracking device.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::AscensionTracker, igstk::CircularSimulatedTracker, igstk::MouseTracker, igstk::QMouseTracker, igstk::NDITracker, and igstk::SimulatedTracker.
|
protectedpure virtual |
The "InternalReset" method resets tracker to a known configuration.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::AscensionTracker, igstk::InfiniTrackTracker, igstk::NDITracker, igstk::CircularSimulatedTracker, igstk::MouseTracker, igstk::QMouseTracker, and igstk::SimulatedTracker.
|
protectedpure virtual |
The "InternalStartTracking" method starts tracking.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::CircularSimulatedTracker, igstk::SimulatedTracker, igstk::MouseTracker, and igstk::QMouseTracker.
|
protectedpure virtual |
The "InternalStopTracking" method stops tracking.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::CircularSimulatedTracker, igstk::MouseTracker, igstk::QMouseTracker, and igstk::SimulatedTracker.
|
protectedpure virtual |
The "InternalUpdateStatus" method updates tracker status.
This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::AscensionTracker, igstk::CircularSimulatedTracker, igstk::SimulatedTracker, igstk::NDITracker, igstk::MouseTracker, and igstk::QMouseTracker.
|
protectedpure virtual |
The "InternalThreadedUpdateStatus" method updates tracker status.
This method is called in a separate thread. This method is to be implemented by a descendant class and responsible for device-specific processing
Implemented in igstk::Ascension3DGTracker, igstk::InfiniTrackTracker, igstk::MicronTracker, igstk::AscensionTracker, igstk::CircularSimulatedTracker, igstk::SimulatedTracker, igstk::NDITracker, igstk::MouseTracker, and igstk::QMouseTracker.
|
protectedvirtual |
Print the object information in a stream.
Reimplemented from igstk::Object.
Reimplemented in igstk::MicronTracker, igstk::InfiniTrackTracker, igstk::CircularSimulatedTracker, igstk::SimulatedTracker, igstk::QMouseTracker, and igstk::MouseTracker.
|
protectedpure virtual |
Verify if a tracker tool information is correct before attaching it to the tracker.
This method is used to verify the information supplied by the user about the tracker tool. The information depends on the tracker type. For example, during the configuration step of the MicronTracker, location of the directory containing marker template files is specified. If the user tries to attach a tracker tool with a marker type whose template file is not stored in this directory, this method will return failure. Similarly, for PolarisTracker, the method returns failure, if the tool part number specified by the user during the tracker tool configuration step does not match with the part number read from the SROM file.
Implemented in igstk::Ascension3DGTracker, igstk::InfiniTrackTracker, igstk::MicronTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::MouseTracker, igstk::QMouseTracker, igstk::AuroraTracker, igstk::SimulatedTracker, and igstk::PolarisTracker.
|
protectedvirtual |
The "ValidateSpecifiedFrequency" method checks if the specified frequency is valid for the tracking device that is being used.
This method is to be overridden in the derived tracking-device specific classes to take into account the maximum frequency possible in the tracking device
Reimplemented in igstk::Ascension3DGTracker, igstk::InfiniTrackTracker, igstk::MicronTracker, igstk::NDITracker, igstk::AuroraTracker, and igstk::PolarisTracker.
|
protectedpure virtual |
This method will remove entries of the traceker tool from internal data containers.
Implemented in igstk::Ascension3DGTracker, igstk::InfiniTrackTracker, igstk::MicronTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::AuroraTracker, igstk::CircularSimulatedTracker, igstk::QMouseTracker, igstk::MouseTracker, and igstk::SimulatedTracker.
|
protectedpure virtual |
Add tracker tool entry to internal containers.
Implemented in igstk::Ascension3DGTracker, igstk::InfiniTrackTracker, igstk::MicronTracker, igstk::AscensionTracker, igstk::NDITracker, igstk::QMouseTracker, igstk::MouseTracker, and igstk::SimulatedTracker.
|
protected |
Access method for the tracker tool container.
This method is useful in the derived classes to access the unique identifiers of the tracker tools
|
protected |
Report to tracker tool that it is not available for tracking.
|
protected |
Report to tracker tool that it is visible.
|
protected |
Set tracker tool raw transform.
|
protected |
Turn on/off update flag of the tracker tool.
|
protected |
Depending on the tracker type, the tracking thread should be terminated or left untouched when we stop tracking.
For example, in the case of MicronTracker, it is better to not terminate the tracking thread. Otherwise, everytime we restart tracking, then the camera has to be reattached. For NDI trackers, the tracking thread has to be terminated first to send TSTOP command Always called when exiting tracking state. This methold will be overriden in derived classes.
|
protected |
Exit tracking without terminating tracking thread.
|
protected |
Exit tracking after terminating tracking thread.
igstkStandardAbstractClassTraitsMacro ( Tracker, Object ) public typedef TrackerTool igstk::Tracker::TrackerToolType |
Macro with standard traits declarations.
typedefs from TrackerTool class
Definition at line 101 of file igstkTracker.h.