[IGSTK-Users] Error in PolarisTracker::AttachSROMFileNameToPort()

Patrick Cheng cheng at isis.georgetown.edu
Tue May 8 08:48:07 EDT 2007


Hi Torleif Sandnes,

1. The first 3 ports are reserved for actively tracked tools for 
Polaris, they don't take SROM file

2. We should make that clear in the tracker documentation

3. The tracker API should follow the Request*** rule.

Thank you,

Patrick

Torleif Sandnes wrote:
> Hi.
> 
> I have spent some days trying to get tracking working in my application. 
> I am new to tracking and did some copying and pasting from the Needle 
> Biopsy example to my code.
> Looking at the log from the tracker, I saw that it had entered the 
> *tracking* state, periodically entered *AttemptingToUpdateState* and 
> returned to *Tracking* with SuccessInput.
> However, there was no tracking of the spatial object in my QView3D.
> 
> After investigating the transforms returned from the tracker and reading 
> the code of PolarisTracker and checking all sorts of potential error 
> sources, I found these lines in PolarisTracker::AttachSROMFileNameToPort()
> 
> void PolarisTracker::AttachSROMFileNameToPort( const unsigned int portNum,
>                                                std::string fileName )
> {
>   igstkLogMacro( DEBUG, "PolarisTracker::AttachSROMFileNameToPort 
> called..\n");
> 
>   // the first 3 ports are active, don't allow SROMS for them
>   if ( (portNum >= 3) && (portNum <= NumberOfPorts) )
>     {
>     m_SROMFileNames[portNum] = fileName;
>     }
> }
> 
> It seems that if a port is below 3, it will not be taken into account 
> and the tracker will continue as if everything is ok.
> This leaves me with three questions:
> 
> 1. Shouldn't the tracker enter some kind of error state if an invalid 
> portnumber is specified by the user?
> 
> 2. Doesn' t the AttachSROMFileNameToPort() break with the Attempting 
> pattern used in igstk?
>     (Along with SetCommunication()?)
> 
> 3. Why are the three first ports on polaris considered active before any 
> tools have been added?
> 
> Regards,
> Torleif Sandnes
> Sintef Health Research
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
> 
> 
> 



More information about the IGSTK-Users mailing list