[ITK] [ITK-dev] Compositions in ScaleVersor3D and ScaleSkewVersor3D Transforms
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri Dec 12 12:11:13 EST 2014
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 Community
mailing list