[IGSTK-Users] Tool positions or Tools Translations?

Jake McIvor jdmcivor at interchange.ubc.ca
Mon Jun 29 18:00:38 EDT 2009


Hey Eric,

Okay, I think I understand what you are trying to do now.  You are
using a wireless Polaris tool with 3 passive markers, and interested
in figuring out the location and orientation of the plane defined by
the center of the three markers.

The RequestComputeTransformTo() method is part of the CoordinateSystem
class.  It is described in chapter 8 of the IGSTK book. It will
compute the transform between any two coordinate systems as long as
they are connected by a scene graph.  The GetTransform() method only
returns the transform to the parent.  There is an example of how to
use it with a transform observer in the Needle Biopsy example (Chapter
22):

// Connect observer
typedef igstk::TransformObserver ObserverType;
ObserverType::Pointer transformObserver = ObserverType::New();
transformObserver->ObserveTransformEventsFrom( m_ActiveTool );
transformObserver->Clear();

// Request for transform
m_ActiveTool->RequestComputeTransformTo( m_WorldReference );

// Check the recipient
if ( transformObserver->GotTransform() )
{
   // Retreive the transform
   igstk::Transform transform = transformObserver->GetTransform() ;
}

In your case, you'd swap m_ActiveTool with the ellipsoid spatial
object and m_WorldReference with your static reference tool.

There may be an easier way, however.  You said that the local
coordinate system of your tool is centered at one of the markers.  If
the other two markers are defined to be in the xy plane, and perhaps
defined along the x or y axis, then the normal axis of your plane will
be aligned with the z-axis of the local coordinate system.  You could
then use the transform (position + orientation) information of the
tool itself without worrying about calculating the position of the
markers and then calculating the plane based on the marker
positions...

Cheers,

Jake



On Mon, Jun 29, 2009 at 1:57 PM, Eric L. B.<eric_lb at hotmail.com> wrote:
>
> Hello Jake...
>
> There is no relative motion between markers, they are fixed like a rigid
> body.
> In the scene graph, the position of the spheres match the settings in the
> tool geometry file.
> I use a static reference tool.
> Can you explain me more about the RequestComputeTransformTo() method??? i
> can't find information helpfull.
> I've only found that there is two methods with this name:
> void RequestComputeTransformTo(const CoordinateSystem* targetCoordSys); //
> in IGSTKCoordinateSystem.h
> void RequestComputeTransformTo(const TTarget & target); // in
> IGSTKCoordinateSystemDelegator.h
>
>
> Wich is the difference with GetTransform() or where can i get more
> information about it???
> In our project, the purpose of to get the positions of the three markers is
> to know the orientation and position of the plane generated by these three
> points.
> This plane represents an image that moves fixed to the passive tool. hope
> this information can help to give you an idea :P
>
>
> Thanks,
>
> Eric
>
> Image Analysis And Visualization Laboratory
> Centro de Ciencias Aplicadas y Desarrollo Tecnologico CCADET
> Universidad Nacional Autónoma de México
> Circuito Exterior S/N, Cd. Universitaria,
> AP 70-186, CP 04510 México, DF
> Tel: +(52)(55) 56 22 86 02, ext. 1130
>
>
>
>
>
>
>> Date: Mon, 29 Jun 2009 10:28:57 -0700
>> Subject: Re: [IGSTK-Users] Tool positions or Tools Translations?
>> From: jdmcivor at interchange.ubc.ca
>> To: eric_lb at hotmail.com; igstk-users at public.kitware.com
>>
>> Hey Eric,
>>
>> Can you clarify something? Is there any relative motion between your
>> passive markers, or are they fixed to a rigid body?
>>
>> If they are fixed like a 'normal' wireless tool, you should be able to
>> setup your scene graph in IGSTK to match the settings in the .rom
>> file. I think you want to use the RequestComputeTransformTo() method
>> instead of the GetTransform() method. The argument should be whatever
>> your reference is (I think you were using a static reference tool).
>> The GetTransform() method only returns the transform to an objects
>> parent, which in this case would be your tool, and the transform you
>> defined.
>>
>> Although it is possible to get single (stray) marker position data
>> from Polaris, as others have mentioned, IGSTK doesn't really support
>> it. I believe the difficulty is because there is no way to keep track
>> of which marker is which.
>>
>> So, if you just want to recreate where the markers were as you moved a
>> wireless tool, you should be able to change your method as above. If
>> you want to look at the actual positions of the markers, it will be
>> more difficult.
>>
>> Hope that helps,
>>
>> Jake
>>
>> --
>> Jake McIvor
>> MASc Candidate, Biomedical Engineering
>> University of British Columbia
>>
>>
>
>
> ________________________________
> Tu vida, tus amigos y lo que te interesa está en Perfil de Windows Live.
> Actualízalo.



More information about the IGSTK-Users mailing list