div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

DWARF::MultiTrackerBase Class Reference

Inheritance diagram for DWARF::MultiTrackerBase:

Inheritance graph
[legend]
Collaboration diagram for DWARF::MultiTrackerBase:

Collaboration graph
[legend]

Public Member Functions

 MultiTrackerBase (MultiTrackerReceiver *receiver1, MultiTrackerReceiver *receiver2, bool onlineLearning)
virtual ~MultiTrackerBase ()
virtual void newPoseData (MultiTrackerReceiver *receiver, PoseData *pose)
bool setCurrentPose (PoseSender *poseSender)

Protected Member Functions

virtual void train ()
virtual double getRatio (PoseData *poseTracker1, PoseData *poseTracker2)=0
int getReceiverIndex (MultiTrackerReceiver *receiver)
Direction getDirection ()

Protected Attributes

MultiTrackerReceiverm_receiver [2]
 Pointers to the MultiTrackerReceiver objects.
int m_numberOfPoints [2]
 Number of PoseData events received by both tracking sources.
TrainingPhase m_trainingPhase
 Specifies the current training phase.

Private Member Functions

double getTimeLastPose ()
 Retrieves the time (in seconds) of the last PoseData event received.
void deleteOldPoseData ()
 Removes old PoseData events from the direction queue.

Private Attributes

bool m_onlineLearning
 Specifies if online learning is supported.
PoseData m_lastPoseData [2]
 The last PoseData events received by both tracking sources.
queue< PoseDatam_direction [2]
 PoseData queue used for calculating the moving direction.

Detailed Description

Abstract base class which provides the interface for any MultiTracker transition strategy

Definition at line 53 of file MultiTrackerBase.h.


Constructor & Destructor Documentation

MultiTrackerBase::MultiTrackerBase MultiTrackerReceiver receiver1,
MultiTrackerReceiver receiver2,
bool  onlineLearning
 

Constructor

Parameters:
receiver1 Pointer to the MultiTrackerReceiver which receives PoseData events from tracker 1
receiver2 Pointer to the MultiTrackerReceiver which receives PoseData events from tracker 2
onlineLearning true, if the class supports online learning, false otherwise

Definition at line 19 of file MultiTrackerBase.cpp.

MultiTrackerBase::~MultiTrackerBase  )  [virtual]
 

Destructor

Definition at line 32 of file MultiTrackerBase.cpp.


Member Function Documentation

Direction MultiTrackerBase::getDirection  )  [protected]
 

Retrieves the current moving direction

Returns:
Current moving direction (the vector also specifies the moving speed in m/s)

Definition at line 220 of file MultiTrackerBase.cpp.

virtual double DWARF::MultiTrackerBase::getRatio PoseData poseTracker1,
PoseData poseTracker2
[protected, pure virtual]
 

Determines how the two tracking sources are to be combined (has to be implemented in the subclasses!)

Parameters:
poseTracker1 Pointer to a PoseData event from tracker 1
poseTracker2 Pointer to a PoseData event from tracker 2
Returns:
A value between 0 and 1 which specifies at which ratio the tracking sources should be mixed (e.g. 0.8 -> 80% of tracker 1, 20% of tracker 2)

Implemented in DWARF::MultiTrackerConvexHull, and DWARF::MultiTrackerNeuralNet.

int MultiTrackerBase::getReceiverIndex MultiTrackerReceiver receiver  )  [protected]
 

Retrieves to which tracker a MultiTrackerReceiver corresponds

Parameters:
receiver Pointer to a MultiTrackerReceiver object
Returns:
0 or 1

Definition at line 210 of file MultiTrackerBase.cpp.

void MultiTrackerBase::newPoseData MultiTrackerReceiver receiver,
PoseData pose
[virtual]
 

Handles new PoseData events

This method performs tasks which are common to all transition strategies, i.e. storing the last PoseData events, updating the direction, etc.

Parameters:
receiver Pointer the MultiTrackerReceiver which received the PoseData event
pose Pointer to the received PoseData event

Reimplemented in DWARF::MultiTrackerConvexHull, and DWARF::MultiTrackerNeuralNet.

Definition at line 36 of file MultiTrackerBase.cpp.

bool MultiTrackerBase::setCurrentPose PoseSender poseSender  ) 
 

Creates the current PoseData by combining the last PoseDatas of both tracking sources (if available) by calling getRatio(...)

Parameters:
poseSender Pointer to a PoseSender object which will be filled with the current PoseData
Returns:
true, if there is a current pose available, false otherwise (e.g. if both tracking sources didn't send PoseData events recently)

Definition at line 73 of file MultiTrackerBase.cpp.

void MultiTrackerBase::train  )  [protected, virtual]
 

Trains the service (should be overridden in the subclasses if they don't support online learning)

Reimplemented in DWARF::MultiTrackerNeuralNet.

Definition at line 205 of file MultiTrackerBase.cpp.

DWARF::MultiTrackerBase Class Reference | generated on Sun Apr 29 02:02:03 2007 by Doxygen 1.4.1 for DWARF