Rotation Around a Specified Axis

(Dr Jessop) #1

I am trying to rotate an MRI image around the z-axis by 90 degrees. I can specify the center of rotation using an Euler3DTransform, however I cannot specify the direction of rotation (the image is diagonally rotated). How can I achieve this? Thank you.

(Matt McCormick) #2

Hello Dr. Jessop,

Welcome to the ITK community!

One option is to call SetRotation on the transform.

If you do not wish to resample the image, call SetDirection on the Image or use the ChangeImageInformationImageFilter.


(Dr Jessop) #3

Hello, to be more specific, my image is rotated as so, and when I specify my SetRotation, I want the axes to be normal to all planes of the image. I believe the default behaviour of the axes to be like in the drawing I attached. Thank you.

(Matt McCormick) #4

Thank you for the drawing. I am not sure, though, what other information is required.

(Dženan Zukić) #5

This seems to be a better description of the problem:

(Ziv Yaniv) #6

Indeed, problem description there was clearer. I posted an answer there with a pointer back to this discussion.

1 Like
(Dr Jessop) #7

Thanks again for your help, I posted a full solution based off of your feedback there.

1 Like