I have two sitk images im1 and im2 with same physical size and shape. They are displayed correctly in slicer3d in terms of orientation. But they have different origins and directions as following,
im1_origin = (124.0, 77.23600006103516, 0.0) im2_origin = (0,0,0) im1_direction = (-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0) im2_direction = (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)
When they are converted to numpy arrays, as you know, their orientation are now different since they are simply arrays now.
So how can I transform (i.e. flipping axis) im1 to the orientation of im2 using the information above before converting to numpy arrays so I can have them in the desired orientation in numpy?