[Insight-users] Rigid3DTransform error Attempting to set a non-orthogonal rotation matrix

Luis Ibanez luis.ibanez at kitware.com
Thu Feb 12 11:27:04 EST 2009


Hi Mathias,

A rigid transform necessarily requires an Orthogonal matrix.


If you try to force a non-othogonal matrix into the transform,
then the transformation will contain Scaling and Shearing
effect, which is something that a Rigid Transform shouldn't
include.

The Rigid Transform class is correctly rejecting your Matrix
as an inappropriate input.


When you set the first 9 parameters of the transform to 0.1
you are construction a rotation Matrix:

        0.1  0.1  0.1
        0.1  0.1  0.1
        0.1  0.1  0.1

that is obviously non-orthogonal, and therefore
it can not be a valid representation of a rotation
in 3D space.


If you don't now how to initialize a rotation matrix, then
you should at least use the Transform Initializer class, as
it is illustrated in the examples:


    Insight/Examples/Registration/
                      ImageRegistration12.cxx
                      ImageRegistration13.cxx
                      ImageRegistration14.cxx
                      ImageRegistration6.cxx
                      ImageRegistration6o.cxx
                      ImageRegistration7.cxx
                      ImageRegistration7o.cxx
                      ImageRegistration8.cxx
                      ImageRegistration9.cxx
                      MultiResImageRegistration2.cxx



Another potential way of producing a consistent
rotation matrix is to use an itkVersor, set its axis
and rotation angle, and then extracts its Matrix.



     Regards,



        Luis


---------------------
Matthias Keil wrote:
> Hello,
> 
> with regards to this e-mail to the mailing list which unfortunately did 
> not get any feedback:
> 
> http://www.nabble.com/funning-observation-regarding-SetMatrix%28%29-in-VersorRigid3DTransform-class--tp20409801p20409801.html
> 
> I am writing to the mailing list hoping to get some more insight into the problem.
> 
> Using Rigid3DTransform and the Amoeba optimizer for registration of 2 volumes (one was manually rotated by 5 degrees around the x axis) seems to be quite challenging to me. Unfortunately I can't initialize my registration in a way which makes it compute any iterations. I do get the error "Attempting to set a non-orthogonal rotation matrix" mentioned in the subject everytime. As pinpress guessed right, there is a test for the identity matrix.
> 
>>My guess is that in ITK library somewhere, there is a check (e.g., to check
>>if determinant of the matrix is exactly 1, because it is a "rigid"
>>transform), but the tolerance is not set properly which caused the problem
>>that I experience.
> 
> This test is implemented in itkRigid3DTransform.txx line 77.
> 
> I am using the following parameter values for Rigid3DTransform:
> - first 9 rotation parameters are set to 0.1
> - the three translation parameters are set to 0.001
> 
> And the simplex delta parameter values for the optimizer:
> - first 9 values set to 5
> - the last 3 values set to 0 (as there is no translation)
> 
> My question is now as pinpress already asked
> 
>>However, is such checking necessary?
> 
> Thanks in advance for any help,
> Matthias
> 
> -- 
> | Dipl.-Ing. Matthias Keil
> |
> | Fraunhofer Institute for Computer Graphics (IGD)
> | Cognitive Computing & Medical Imaging
> | Fraunhoferstraße 5, 64283 Darmstadt, Germany
> |
> | phone  : +49 6151 155 212
> | fax    : +49 6151 155 480
> | mobile : +49 173 5709746
> | e-mail : matthias.keil at igd.fraunhofer.de
> | skype  : matthias.keil.office
> | web    : http://www.igd.fraunhofer.de/~makeil
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> 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://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list