# Slicer Transform vs elastix Transform

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?

Elastix can only return the transform as a displacement field. It does not return parameters such as translation or rotation.

We plan to work with Elastix developers to add the possibility to retrieve linear or bspline transforms, but it is not available yet.

1 Like

Thanks Andras for your concern,

still not clear, what do you mean by transform as displacement field?

This is what elastix returns:
`(TransformParameters θ_x , θ_y , θ_z , t_x , t_y , t_z)`
3 angles in radians and 3 translations in mm.
Aren’t these the 3D rigid transform 6 parameters?
Please correct me if I am wrong, in your extension, you saved the result of elastix registration transform as a big hdf5 transform file, which includes each point in the moving image and its displacement
`point_0, dis_x0, dis_y0, dis_z0, point_1, dis_x1, dis_y1, dis_z1, ..., point_n, dis_xn, dis_yn,dis_zn`
How did you compute the displacement field from the above 6 parameters?

We plan to work with Elastix developers to add the possibility to retrieve linear or bspline transforms, but it is not available yet.

@lassoan its been a while, any update on this?

We have not yet started the project that requires this feature, so there is no updates so far.

Again, We need this feature, any update on this? I cant use elastix the way it is now without this feature.
Actually is the input transformation what I am missing. I need that the Moving volume may have already associated a transformation, So I will just modify it.
Hmm, I realize this is a whole new request, I will make the new thread.