[IGSTK-Developers] Re: Tool orientation calibration - a bug in ITK quaternion-rotationmatrix

Hui Zhang zhang at isis.imac.georgetown.edu
Wed Dec 21 15:49:04 EST 2005


Hi, David & Luis,

I tested some from the PrincipalAxisCalibration for some maunally settings, 
and find some error results. I check the code, and think it is a bug caused 
by the quaternion<->rotation matrix transform in ITK Versor code. The ITK 
Versor::Set(MatrixType matrix) function can't return a correct quaternion 
from rotation matrix in its implementation. I maually set several orthogonal 
rotatiom matrice, and use the Set and GetMatrix functions from itk::Versor, 
and get inconsistent results.

For verification, I swtiched to VNL quaternion and matrix computation and 
get the correct one, using Get/Set methods. After swtiching to VNL code, the 
PrincipalAxisCalibration will return the correct rotation transform.

For IGSTK is based on ITK, so, can you help fix this bug in ITK Versor in 
some time later, Luis or David? I don't have access there. When fixing this 
code, another thing needs to make sure is, the IGSTK orthogonal rotation 
matrix is following standard column-order and VNL matrix is row-order.

P.S have a good vocation!

James

----- Original Message ----- 
From: "David Gobbi" <dgobbi at atamai.com>
To: "Hui Zhang" <zhang at isis.imac.georgetown.edu>
Cc: "IGSTK-developers" <igstk-developers at public.kitware.com>
Sent: Tuesday, December 20, 2005 2:59 PM
Subject: Re: Tool orientation calibration


> Hi James,
>
> Right now Patrick is just making the versor rotation himself (see his
> last couple list emails), but he should try out the 
> PrincipalAxisCalibration
> to see how it works.  It should be more intuitive.
>
> The ReferenceCalibration class isn't needed right now, but in the future I
> can see it being useful for calibrating customized or specialized tools.
>
> - David
>
> P.S. I'm going to miss the T-con this week, tomorrow I fly to Vancouver.
>
>
> Hui Zhang wrote:
>
>> Hi, David,
>>
>> Thanks for your comment. That class can be firstly tested with 
>> FourViewTrackingWithCT example. With the modified tracker tool 
>> calibration calculation, we can see whether this class will give a 
>> correct rotation element to transform the default Y-axis aligned 
>> igstkCylinederObject to Z-axis aligned tracked tools. I have tested it 
>> with the general rotation, such as from Y-axis to Z-axis and it returned 
>> the correct quaternion, but it needs to be verified in the real 
>> application.
>>
>> About the "ReferenceCalibration" class I mentioned before, I dunno the 
>> group's opition whether we need this component in the IGSTK. If they 
>> think it is worth to add this class and can be practically used in the 
>> real application, I can try to add it. For Patick's case, he can input 
>> the tip's translation (x, y, z) and another 'end point' such as (x, y, z 
>> + needle's length) to get the full calibration matrix, which can be input 
>> to TrackerTool's SetCalibrationTransform method. And as you pointed 
>> before, the interface of this class will be a bit tricky for it should 
>> handle all 'points' from 3D to 6D, that is what I am thinking about.
>>
>> Regards,
>> James
>>
>> ----- Original Message ----- From: "David Gobbi" <dgobbi at atamai.com>
>> To: "Hui Zhang" <zhang at isis.imac.georgetown.edu>
>> Cc: "IGSTK-developers" <igstk-developers at public.kitware.com>
>> Sent: Tuesday, December 20, 2005 11:34 AM
>> Subject: Tool orientation calibration
>>
>>
>>> Hi James,
>>>
>>> I've taken a good look at igstkPrincipalAxisCalibration,
>>> and it is exactly what we need for tracked pointers.
>>>
>>> Defining both the "Initial" and "Desired" orientation is
>>> a very good idea.
>>>
>>> The class will have to be properly tested with an actual
>>> tracker to make sure it is giving the correct results.
>>>
>>> Are you still planning to add a "ReferenceCalibration" class,
>>> for doing precise orientation calibration procedures for
>>> tools like needles where the "point" isn't fixed?
>>>
>>> - David
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> 





More information about the IGSTK-Developers mailing list