Registration fails if the moving image is translated

Hi! I am trying to do different kinds of image registration with ITK (not simpleitk). I attach the code I use (it’s from one of the examples with small modifications).

itk.cpp (6.1 KB)

I use the Euler3DTransform model because the documentation says it’s a rotation + translation (total 6 parameters for optimization). The target function to minimize is MeanSquaresImageToImageMetricv4. I have already tried different types of optimizers all with the same result. The problem is as follows: I have a test image. When I rotate the image (outside of ITK) by arbitrary angles around all 3 axes, ITK is able to find the correct transform. When I add an additional translation by a small vector, ITK always fails. If I e.g. try a small translation without rotations and use TranslationTransform instead, the registration succeeds. How can I register an image with both rotation and translation?

My ITK version is 5.3.0

Hello @Vasily_Postnicov,

You are missing the scales estimation that is applied to the different transformation parameters. A step of 1mm in translation has a different effect than a rotation of 1radian on the optimization, so these are scaled to have similar effects. This is achieved using one of RegistrationParameterScalesFromPhysicalShift, RegistrationParameterScalesFromIndexShift, itkRegistrationParameterScalesFromJacobian.

Usage illustrated in this example.

3 Likes

Thanks!