[IGSTK-Users] tracking in IGSTK 3

Patrick Cheng cheng at isis.georgetown.edu
Tue Apr 15 15:07:15 EDT 2008


Hi Özgür Güler,

I just took a close look at your code.

Step 5, you get the patient landmark points using
  trackerTool->RequestGetTransformToParent();

If I understand correctly, you are using a reference tool in your 
application. So you should be registering the reference tool's 
coordinate system to the image. I think you should change it to
  trackerTool->RequestComputeTransformTo( referenceTool );

Try this first see if it fixes your problem.

For step 8, you are doing the right thing.

Thank you,

Patrick


Patrick Cheng wrote:
> Hi Özgür Güler,
> 
> http://public.kitware.com/IGSTKWIKI/index.php/Needle_Biopsy#How_to_connect_the_scene_graph 
> 
> 
> I have put together a tutorial on how to connect the scene graph in a 
> typical image guided surgery using the needle biopsy as an example.
> 
> Please take a look at it, see if it will help.
> 
> Thank you,
> 
> Patrick
> 
> Özgür Güler wrote:
>> Hallo,
>>
>>> 1) What components do you have in your application? (How many tracker 
>>> tools,
>>>      View, Image spatial object...etc)
>>
>> //VIEW
>> igstk::FLTKWidget
>> igstk::View2D
>> igstk::View3D
>> //READER igstk::CTImageReader //IMAGE OBJECT
>> ImageSpatialObjectType;
>> //IMAGE OBJECT REPRESENTATION
>> igstk::CTImageSpatialObjectRepresentation            //REGISTRATION
>> igstk::Landmark3DRegistration //TRACKING
>> igstk::SerialCommunication
>> igstk::PolarisTracker
>> igstk::PolarisTrackerTool
>> igstk::TransformObserver
>>
>>> 2) How are they connected?  ( a sketch of collaboration diagram 
>>> between the components would
>>>  be great .)
>>> 3) What is the work flow of your application?
>>
>>  LIKE THE THE NEEDLE BIOPSY EXAMPLE IGSTK SANDBOX 2.0.1
>>
>> I'll go through the relevant parts namely setting transformations and 
>> parents
>>
>> 1. Read image with the reader
>> and get the image through the image observer and set
>>
>> m_ImageSpatialObject->RequestSetTransformAndParent( transform, 
>> worldReference );
>> //worldRerence is a AxesObject and transform an identity transform
>>
>> 2. Initialize Views and set e.g.
>>
>> DisplayAxial->RequestSetTransformAndParent( transform, worldReference );
>>
>> 3. Get landmarks from image
>>
>> 4. Initialize Tracker, TrackerTool and drfTool and set
>> ...
>> drfTool->RequestAttachToTracker( m_Tracker );
>> m_Tracker->RequestSetReferenceTool( drfTool );
>> ...
>> m_Tracker->RequestStartTracking();
>> ...
>>
>> 5. Get landmarks from patient with tracker
>> ...
>> m_Tracker->RequestUpdateStatus();
>> ...
>> trackerTool->RequestGetTransformToParent();
>>
>> 6. Compute Registration
>> ...
>> m_Tracker->RequestStopTracking();
>> ...
>> m_LandmarkRegistration->RequestComputeTransform();
>> m_LandmarkRegistration->RequestGetRMSError();
>> m_LandmarkRegistration->RequestGetTransformFromTrackerToImage();
>> ...through event
>> drfTool->RequestSetTransformAndParent(m_ImageToTrackerTransform, 
>> worldReference);
>>
>> 7. Start Tracking
>> ...
>> m_Needle->RequestSetTransformAndParent( transform, trackerTool );
>> m_NeedleTip->RequestSetTransformAndParent( transform, trackerTool );
>> ...
>> m_Tracker->RequestStartTracking();
>> m_PulseGenerator->RequestStart(); 
>> 8. Tracking
>>
>> ... I'm not sure which one to use
>> trackerTool->RequestComputeTransformTo( worldReference );
>> //trackerTool->RequestGetTransformToParent();
>> //trackerTool->RequestComputeTransformTo( drfTool );
>> //trackerTool->RequestComputeTransformTo( m_Tracker );  
>> thx yet
>>
>> özgür
>>
>>
>>
>>>> Hello,
>>>>
>>>> I've written an igstk app with release 2. It works well.
>>>> Now I'll port this app to igstk release 3.
>>>> I'm using a PolarisTracker (1.Generation (driver written by me)) with a
>>> referenceTool. Tracking works well.
>>>> In detail I've problems to set correctly the 
>>>> ->RequestSetTransformAndParent(..,..)
>>>> functions for the Objects Tracker, TrackerTool, ReferenceTool,
>>> ImageSpatialObject.
>>>>
>>>>
>>>> I tried many constellations e.g. one of them
>>>> ...
>>>> m_ImageSpatialObject->RequestSetTransformAndParent(transform,
>>> worldReference);
>>>> ...
>>>> //tracker init: transform = identity
>>>> referenceTool->RequestSetTransformAndParent(transform, worldReference);
>>>> ...
>>>> //landmark registration: transform = computed from registration
>>>> referenceTool->RequestSetTransformAndParent(transform, worldReference);
>>>> ...
>>>> //Tracking
>>>> trackerTool->RequestComputeTransformTo( worldReference );
>>>> this constellation didn't work.
>>>> Is there an error in my reasoning? How should I set up the 
>>>> associations between the transforms and the
>>> object parents?
>>>> please help.
>>>>
>>>> best regards
>>>>
>>>> özgür güler
>>>> ENT clinic
>>>> Innsbruck Austria
>>>>
>>>>
>>>>
>>>>  
>>>>
>>>
>>> -- 
>>> ==========================================================
>>> Andinet A. Enquobahrie, PhD
>>> R&D Engineer
>>> Kitware Inc.
>>>
>>> 28 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-371-3971 x124
>>> www.kitware.com
>>>
>>
> _______________________________________________
> 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