I am using this AffineMatrix to rotate the image by 90 degrees.
array([[ 1., 0., 0., 0.],
[ 0., 0., -1., 0.],
[ 0., 1., 0., 0.],
[ 0., 0., 0., 1.]])
When I apply this transformation to image(left is the original one and the right is the result of transformation), I am getting this output.
What I was expecting is this:
I have a rough idea this might be due to direction cosine. Since affine matrix is a combination of multiple transforms, I was trying to apply rotation using sitk’s AffineTransform. Can this be done? Am I missing something here?