It is not clear the relation between them, here is what I did:
- Transform manually an image imgf using Slicer Transforms module, only one translation t_x in LR and one rotation θ_x in LR
- t_x=10 mm , θ_x= 45 degrees
- the rotation matrix mSlicer= [[1,0,0,0],[0,.71,-.71,0],[0,.71,71,0],[0,0,0,1]]
- save the transformed image as imgm
- Use elastix to register imgm to imgf again using rigid transform parameters, ensure the are aligned
- (TransformParameters θ_x , θ_y , θ_z , t_x , t_y , t_z)
- get the matrix from the angles (I used an external script).
- mE= [[ 1.,-0.,0.,t_x],[ 0.,0.71,0.71,t_y],[-0.,-0.71,0.71,t_z],[0.,0.,0.,1.]]
- mE is not similar to mS, there is problem of the sign as well.
What I am missing?