Transforms not working as expected

Do transforms in SimpleITK work differently than the conventional representations? In SITK, if I understand correctly, the usual transformation matrix is broken down into the translation part and the “matrix” part. For instance I tried to apply the same transformation (rotate by 45 degrees) using openCV and with SITK, and the results were quite different. Can someone explain what is happening?

Here’s a short notebook showing what I meant.

Hello @kekday,

Welcome to SimpleITK!

What is happening is that the transformations work in the other direction (inverse transformation). In SimpleITK resampling convention is that the transformation maps points from the fixed image to the moving image. Please take a look at this Jupyter notebook for all the details.

You may find the notebooks in that repository useful as a starting point for your work.