I just want to thank the ITK team, because I was just able to calculate the displacement field of a non-rigid deformation (simple 3D registration). Then applied that displacement to the deformed image, and got the original one (not perfectly). I was using itk-elastix (and all its dependencies). It still needs some work, but it means a lot to me already. Thank you very much!