[IGSTK-Developers] Inconsistencies within the IGSTK tracking framework
Ziv Yaniv
zivy at isis.imac.georgetown.edu
Tue May 6 18:16:12 EDT 2008
Hi all,
I have the following two questions/problems:
1. How to perform transformation data acquisition.
a. No loop in my code. The tracker is acquiring data at a specified
frequency and we are supposed to observe the tracker. When we get
TrackerUpdateStatusEvent we need to invoke
m_TrackerTool->RequestGetTransformToParent() and listen to the events
generated from the tool to get the transform as payload. To acquire many
transforms, lets say for averaging I have to maintain an ivar to do the
accumulation.
b. Have a loop in my code while(...) tracker->RequestUpdateStatus() and
then ask for m_TrackerTool->RequestGetTransformToParent() and listen to
the events generated from the tool. To acquire many transforms, I use a
local variable.
The pivot calibration code currently does 'b'. This is not good as there
is a concurrent loop that is being run by the tracker. On the other hand
the API should not have a RequestUpdateStatus() for the tracker, it
should only be updated internally.
If option 'a' is the IGSTK way of data gathering then we need to remove
the RequestUpdateStatus() from the tracker and update all the relevant
code to work "correctly".
2. How to set the validity time of the transformation.
Right now there are two options to set the validity time of the
transformation.
a. SetValidityTime() - does what the user expects.
b. RequestSetFrequency() - surprises the user as it shouldn't have
anything to do with the validity time.
When the user invokes the RequestSetFrequency method the state machine
invokes Tracker::SetFrequencyProcessing this in turn has the side effect
of changing the validity time:
/** The "SetFrequencyProcessing" passes the frequency value to the Pulse
* Generator. Note that it is still possible for the PulseGenerator to
reject
* the value and stay at its current frequency. */
void Tracker::SetFrequencyProcessing( void )
{
igstkLogMacro( DEBUG,
"igstk::Tracker::SetFrequencyProcessing called ...\n");
this->m_PulseGenerator->RequestSetFrequency( this->m_FrequencyToBeSet );
//Set the validity time of the transforms based on the tracker frequency
//Add a constant to avoid any flickering effect
const double nonFlickeringConstant = 10;
this->m_ValidityTime = (1000/m_FrequencyToBeSet) + nonFlickeringConstant;
}
I believe that the last two lines should be removed from the method.
regards
Ziv
--
Ziv Yaniv, PhD., Research Assistant Professor
Imaging Science and Information Systems (ISIS) Center
Department of Radiology
Georgetown University Medical Center
2115 Wisconsin Avenue, Suite 603
Washington, DC, 20007,
Phone: +1-202-687-7286
Fax: +1-202-784-3479
email: zivy at isis.georgetown.edu
web: http://isiswiki.georgetown.edu/zivy/
More information about the IGSTK-Developers
mailing list