[IGSTK-Users] Problem (visible or not visible)
Daniel Gil
daniel_taek at yahoo.com
Thu May 22 06:19:06 EDT 2008
Hi, i have solved my problem. The solution is not very elegant, but it's work.
the code is.
double LastPos=0;
int visible;
for(unsigned int i=0; i<1000; i++)
{
tracker->RequestUpdateStatus();
TransformType transform;
VectorType position;
coordSystemAObserver->Clear();
trackerTool->RequestGetTransformToParent();
if (coordSystemAObserver->GotTransform())
{
transform = coordSystemAObserver->GetTransform();
position = transform.GetTranslation();
if (LastPos!=position[2])
visible =1;
else
visible=0;
LastPos=position[2];
if (visible)
printf ("%f %f %f %d\n",position[0],position[1],position[2], visible);
}
}
Julio Daniel
Daniel Gil <daniel_taek at yahoo.com> wrote:
Hi,
my name is Julio Daniel Gil Cano. I just a question. how to verify if a tool is visible or not. I use the code of igstkPolarisTrackerTest2.cxx but the the fonction GotTransform() is always true. and i can't know when the tool is visible or not.
Thanks.
Julio Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080522/5585522e/attachment.html>
More information about the IGSTK-Users
mailing list