[IGSTK-Users] Tracker Tool Out of Volume message

Arefin Shamsil marefin at uwo.ca
Wed Sep 7 18:15:37 EDT 2011


 Hi All,

I have been trying to produce stream message when a tracker tool goes out of volume. Usually when the tools are within volume, the stream message is just updated values of the coordinates. 

I have been trying to accomplish this using 

igstkEventMacro(TrackerToolOutofVolume, igstk::TrackerToolNotAvailableToBeTrackedEvent)

and later in the code, I wrote,
----------------------
if (!(this->m_Tool->HasObserver(TrackerToolOutOfVolume()))){
           
                    sprintf(buffer, "%f   %.3f  %.3f  %.3f  %.3f  %.3f  %.3f  %.3f \n", EDTtimeStamp , -t[0], t[1], -(t[2]+1410),
                    r.GetX()*(180/PI), r.GetY()*(180/PI), r.GetZ()*(180/PI), r.GetW()*(180/PI));
         
                    this->m_PositionMessage.assign(buffer); 

                    std::vector< ofstream * >::iterator it; 
                    for (it = this->m_Ofstreams.begin(); it != this->m_Ofstreams.end(); ++it)
                      {
                         (*(*it)) << this->m_PositionMessage; 
                      }
                    
                    std::cout << this->m_PositionMessage; 
else
                   sprintf(buffer, "NaN  NaN  NaN NaN  NaN NaN  NaN  NaN\n", EDTtimeStamp);
}
------------------------------


But after days of attempts of tweaking it differently, I found it does not work in anyway. I am sure I am missing something but I cannot figure out what.

This is only an extension of the TrackerDataLogger program.

Can someone Please help me diagnose this issue.

Your help would be much appreciated as I am literally couple weeks away from experiment with this outstanding issue.

Sincerely

Arefin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20110907/5a5654f8/attachment-0001.html>


More information about the IGSTK-Users mailing list