[Insight-users] A bug in itkSimilarity3DTransform?

Luis Ibanez luis.ibanez at kitware.com
Fri Sep 7 08:26:56 EDT 2007


Hi Xiao,

Thanks for pointing this out.

We entered this issue as Bug# 5665
http://public.kitware.com/Bug/view.php?id=5665

and committed a fix to the CVS repository:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkSimilarity3DTransform.txx?root=Insight&sortby=date&r2=1.8&r1=1.7

Please not the the solution was not simply adding
the third element of the matrix column.

Instead we estimated the scaling factor by using
the cubic root of the matrix determinant.

The rationale is the the Similarity3D Transform
has a matrix composed of:


        | S  0  0 |   | T00 T01 T02 |
[M] =  | 0  S  0 | * | T10 T11 T12 |
        | 0  0  S |   | T20 T21 T22 |


Where [T] is an orthogonal Matrix, and S is the Scaling
factor. The determinant of the resulting matrix M is
equal to

            Det([M]) = S^3 * Det([T])

and [T] being Orthogonal, should have a unit determinant.

Therefore:

            S = CubeRoot( Det([M] )


---

If you have a chance, please update your CVS checkout of ITK,
give it a try to this code fix, and let us know if you find
any further problems.


     Thanks


        Luis


===========================
Xiao Han wrote:
> Dear All,
> 
> It seems to me that there is a bug inside the itkSimilarity3DTransform.txx:
> 
> Line 284 (similarly for Line 74)
>      m_Scale = vnl_math_sqr(test[0][0]) + vnl_math_sqr(test[0][1]);
> 
> should be
> 
>     m_Scale = vnl_math_sqr(test[0][0]) + vnl_math_sqr(test[0][1])  + 
> vnl_math_sqr(test[0][2]);
> 
> 
> Best,
> Xiao
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list