Page MenuHomePhabricator

GetOrientation() of mitkNavigationDataLandmarkTransformFilter seems to be buggy since ITK 4 integration
Closed, ResolvedPublic

Description

mitkNavigationDataLandmarkTransformFilterTest fails at line 317

Event Timeline

New remote branch pushed: bug-15021-FixOrientationBugITK4

What is the status of this bug? Please change the target milestone to "AfterNextRelease" if this bug is not relevant or cannot be fixed in time for the 2013-06 release.

This bug could not be fixed for release 2013-06. Setting target milestone to next release

The reason, that this test (and probably some more using quaternions) fails is, that converting a itkVersorRigid3DTransform into a vnl_quaternion returns a wrong quaternion (at least if you do it like in the test here).
I reported this bug to the insight-users-list, but havent got a reply yet. The thread can be found here:
http://www.itk.org/pipermail/insight-users/2013-July/048327.html

The ITK-Bug has nothing to do with the change from ITK3 to ITK4, but the test firstly failed with the change to ITK4. This is due to the removal of the function GetRotationMatrix() in itkVersorRigid3DTransform in ITK4. This was used to convert an itkVersorRigid3DTransform in an itkQuaternionRigidTransform by

quaternionTransform->SetMatrix(versorTransform->GetRotationMatrix());

After the change to ITK4 this conversion was replaced in MITK by

vnl_quaternion<double> const quatTemp= vnl_quaternion<double>(versorTransform->GetMatrix().GetVnlMatrix());
quaternionTransform->SetRotation(quatTemp);

quatTemp is the buggy quaternion mentioned above (at least the rotation direction is wrong, rotation axis and angle seem to be the same) and leads to a wrong itkQuaternionRigidTransform.

[0a6378]: Merge branch 'bug-15021-FixOrientationBugITK4'

Merged commits:

2013-07-17 21:35:31 Anja Groch [82d647]
The calculation using a quaternion (which causes the failure) is not necessary and is now replaced by a calculation with matrices only.


2013-06-05 13:43:36 Alfred Franz [e0984c]
added debug messages (remove them later)


2013-06-05 13:42:52 Alfred Franz [92186d]
fixed method to indexed