When I manually change my Transformation Matrix, I am Having some problem. I want to know the logic or reason behind it. know the logic

I have two images, one is CT image and another one is a functional image (SPECT). First to align the center of both images I have manually adjusted the transformation matrix. Then I want to do the scaling so that I have to change the diagonal member of the transformation matrix which I also have done manually. The problem actually rise here, when I do scaling my images again got translated which I do not want. Can anybody tell me the solution? Thanks !

Scaling always happens around the origin, so what you see it the expected behavior. You could use multiple transforms (one to move the fixed point to the origin and then another transform to apply scaling), but it is much faster and more accurate if you perform semi-automatic point-based registration.