A method of evaluating the quality of a deformation field includes providing a deformation field from a first domain to a second domain, where a deformation field Φ=(φx,φy,φz) that transforms a point (x,y,z) in the first domain to a point (X,Y,Z) in the second domain is defined by {X=ϕx(x,y,z)=x+ux(x,y,z)Y=ϕy(x,y,z)=y+uy(x,y,z)Z=ϕz(x,y,z)=z+uz(x,y,z),where ux, uy, uz are displacement fields, and calculating a quality factor as a function of the of the displacement fields and the Jacobian matrix DΦ(x,y,z) of the deformation fields. The quality factor is a measure of the quality of said deformation field.