[Insight-users] Re: VersorRigid3DTransform

Luis Ibanez luis.ibanez at kitware.com
Fri, 02 Jan 2004 13:31:17 -0500


Hi Radhika,

Thanks for your detailed report.
Your program is exposing an open issue
on the use of the VersorRigid3DTransform
as part of the Registration Framework.

This transform has parameters that don't
form a vector space.  In particular,
addition of values to the components of
a versor will not necessaily result in a
versor. Versor composition is done by using
quaternion products, not quaternion additions.

For that reason you cannot use the normal
gradient descent algorithms. This algorithms
use 'addition' as the default mechanism for
updating the position of points in the search
space of the optimizer.

The error that you are facing is the result of
using a typical gradient descent optimizer in
a Versor space. The increments of versor components
result in a triplet that is not a Versor and
therefore triggers an error condition.

The need for an specialized version of a
gradient descent optimizer for VersorRigid3D
transform has been logged as Bug # 475
http://www.itk.org/Bug/bug.php?op=show&bugid=475&pos=11

This optimizer is being created now, at the
image of the VersorTransformOptimizer.  The
new class should be available shortly.


Regards,


    Luis


-------------------------------------

Radhika Sivaramakrishna wrote:

> Hi Luis,
> Thanks for the explanation. I will look at the Doxygen documentation. I had
> the following problem. I ran the VersorRigid3DTransform example
> (ImageRegistration8.cxx) on my pair of images (one rotated by 10 degrees
> w.r.t the other as I explained in my previous mail). After 24 iterations, it
> gave the following exception error. I have enclosed the results obtained, in
> my attachment. Please could you tell me what hte problem is.
> Thanks
> Radhika
> 
>>
>>------------------------------------------------------------------------
>>
>>0   1.07377e+009   [0.000696933, 0.000757833, -0.00398539, 126.627, 134.659, 87.
>>7664, -0.874226, 7.09041, 6.20345]
>>1   1.07377e+009   [0.00163943, 0.00146432, -0.00864709, 126.627, 134.658, 87.76
>>7, -0.874207, 7.01599, 6.13683]
>>2   1.07377e+009   [0.00277315, 0.0022942, -0.0134934, 126.627, 134.657, 87.7685
>>, -0.87421, 6.94132, 6.07054]
>>3   1.07377e+009   [0.00469267, 0.00349103, -0.0188727, 126.627, 134.655, 87.770
>>8, -0.874252, 6.86723, 6.0037]
>>4   1.07377e+009   [0.00764075, 0.00488291, -0.0249502, 126.627, 134.652, 87.774
>>1, -0.874374, 6.79243, 5.93784]
>>5   1.07377e+009   [0.0120025, 0.00631338, -0.031587, 126.627, 134.648, 87.7786,
>> -0.874693, 6.71738, 5.87252]
>>6   1.07377e+009   [0.0187473, 0.0078992, -0.0387002, 126.627, 134.643, 87.7847,
>> -0.875401, 6.64219, 5.80784]
>>7   1.07377e+009   [0.0290275, 0.00942788, -0.046004, 126.627, 134.636, 87.7925,
>> -0.876829, 6.56736, 5.74352]
>>8   1.07377e+009   [0.0448596, 0.0111416, -0.0538625, 126.627, 134.629, 87.8028,
>> -0.879396, 6.49222, 5.68131]
>>9   1.07377e+009   [0.0677921, 0.0129146, -0.0624039, 126.627, 134.62, 87.8158,
>>-0.883947, 6.41885, 5.62007]
>>10   1.07377e+009   [0.0986932, 0.0146444, -0.0713277, 126.627, 134.61, 87.8307,
>> -0.891966, 6.35132, 5.55672]
>>11   1.07377e+009   [0.139157, 0.0163247, -0.0797897, 126.627, 134.599, 87.8473,
>> -0.904535, 6.29018, 5.49361]
>>12   1.07377e+009   [0.189681, 0.0174957, -0.0878074, 126.627, 134.586, 87.8667,
>> -0.922579, 6.23602, 5.43373]
>>13   1.07377e+009   [0.249883, 0.0181283, -0.0951621, 126.627, 134.573, 87.8944,
>> -0.945493, 6.18663, 5.38455]
>>14   1.07379e+009   [0.318978, 0.0182499, -0.10179, 126.627, 134.561, 87.9414, -
>>0.968088, 6.14417, 5.36184]
>>15   1.0738e+009   [0.391643, 0.0184017, -0.107387, 126.627, 134.55, 87.9934, -0
>>.991275, 6.10899, 5.3519]
>>16   1.07381e+009   [0.464827, 0.0186431, -0.1118, 126.627, 134.543, 88.0517, -1
>>.00886, 6.08076, 5.35941]
>>17   1.07381e+009   [0.538336, 0.0189457, -0.115323, 126.627, 134.538, 88.1115,
>>-1.02131, 6.05764, 5.3767]
>>18   1.0738e+009   [0.61357, 0.0192276, -0.11817, 126.627, 134.533, 88.1697, -1.
>>03154, 6.03774, 5.39725]
>>19   1.0738e+009   [0.694608, 0.0193823, -0.120598, 126.627, 134.529, 88.2206, -
>>1.0439, 6.01821, 5.41428]
>>20   1.0738e+009   [0.78022, 0.0197561, -0.123375, 126.627, 134.526, 88.2647, -1
>>.05388, 5.99989, 5.43077]
>>21   1.07379e+009   [0.870308, 0.0206595, -0.126552, 126.627, 134.525, 88.3013,
>>-1.05613, 5.98464, 5.44784]
>>22   1.0738e+009   [0.964428, 0.0221835, -0.130543, 126.627, 134.526, 88.3265, -
>>1.04417, 5.97459, 5.46345]
>>23   1.07381e+009   [1.06033, 0.0236213, -0.134485, 126.627, 134.53, 88.3299, -1
>>.01757, 5.96899, 5.46815]
>>ExceptionObject caught !
>>
>>itk::ExceptionObject (00F3FC70)
>>Location: "itk::Versor::Set( const VectorType )"
>>File: Unknown
>>Line: 0
>>Description: Trying to initializa a Versor witha vector whose magnitude is great
>>er than 1