[ITK-dev] Compositions in ScaleVersor3D and ScaleSkewVersor3D Transforms

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Dec 16 17:32:07 EST 2014


Hello,

I thought I'd just update folks with my progress, I am using symbolic computation to compute the need jacobian, with sympy:

http://nbviewer.ipython.org/urls/gist.githubusercontent.com/blowekamp/359f7d2e5221eae97a1b/raw/dd5614577474dc6b012406a238e702468c886e0b/ScaleSkewJacoboan.ipynb


Looks a bit hairy...

Brad

On Dec 12, 2014, at 12:11 PM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:

> Hello,
> 
> This seems very wrong to me...
> 
> I was looking into the inverse of the classes. And I saw how the matrix was composed from the scale and versor components[1]
> 
>  newMatrix[0][0] = m_Scale[0] - 2.0 * ( yy + zz );
>  newMatrix[1][1] = m_Scale[1] - 2.0 * ( xx + zz );
>  newMatrix[2][2] = m_Scale[2] - 2.0 * ( xx + yy );
>  newMatrix[0][1] = 2.0 * ( xy - zw )  + ( m_Skew[0] );
>  newMatrix[0][2] = 2.0 * ( xz + yw )  + ( m_Skew[1] );
>  newMatrix[1][0] = 2.0 * ( xy + zw )  + ( m_Skew[2] );
>  newMatrix[1][2] = 2.0 * ( yz - xw )  + ( m_Skew[3] );
>  newMatrix[2][0] = 2.0 * ( xz - yw )  + ( m_Skew[4] );
>  newMatrix[2][1] = 2.0 * ( yz + xw )  + ( m_Skew[5] );
> 
> Similarly both classes just add the scale/skew component and don't do correct matrix composition.
> 
> Let R be the versor, S scale, and K skew matrices, and p be a point.
> 
> Currently we have:
> 
> (R+S+K)*p = R*p+S*p+K*p
> 
> Where I expected these classes would be implementing:
> 
> R*S*K*p
> 
> which is a traditional composition of transform matrices.
> 
> Anyone know where the current math came from? Or what it's really doing?
> 
> Is this something that we should fix/improve/evaluate? Or just document what's actually happening?
> 
> Brad
> 
> 
> 
> 
> [1] https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx#L219-L227
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list