[IGSTK-Users] TrackerTool visibility after being attached to Tracker

Vincent Gratsac vincent.gratsac at irisa.fr
Thu Mar 13 06:06:54 EDT 2008


Hi all,

I developed a tracker class which inherits igstk::Tracker and 
communicates with the tracker that we are using in operating room.
I noted that if the user adds a tool to this tracker, and if this to is 
never visible, then its transformation will never been updated. But the 
tracker tool representation will be always visible !
This comes from the initialization of the tool transformation when it is 
attached to the tracker (l. 583):

>   TransformType identityTransform;
>   identityTransform.SetToIdentity( 
> igstk::TimeStamp::GetLongestPossibleTime() );
>  
>   m_TrackerToolToBeAttached->RequestSetTransformAndParent(
>                               identityTransform, this );

So if the TrackerTool's transformation is never modified (because tool 
is never visible), it will always be an identity transformation with an 
infinite validity.
I tried to replace

> identityTransform.SetToIdentity( 
> igstk::TimeStamp::GetLongestPossibleTime() );

by

> identityTransform.SetToIdentity( 0 );

and it works. Now, an attached TrackerTool will be displayed only when a 
valid transformation is set by the UpdateStatusSuccessProcessing() method.

Do you think this is a correct way to do ?

Vincent

P.S : Modified igstkTracker.cxx file is attached.


-- 
Vincent Gratsac
----------------------------------------------------
Unité/Projet VisAGeS U746
INSERM/INRIA/CNRS/U. de Rennes I
IRISA
Campus de Beaulieu, 35042 Rennes Cedex, France

Ph:  +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71
email: Vincent.Gratsac at irisa.fr
http://www.irisa.fr/visages/
-----------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: igstkTracker.cxx
Type: text/x-c++src
Size: 36588 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080313/bfb1c3d3/attachment-0009.cxx>


More information about the IGSTK-Users mailing list