I have applied a non-rigid deformation to a nifti file (dimension is (203, 127, 161)) and saved the deformation vector field as another nifti file. The shape of this DVF nifti mage is (203, 127, 161, 1, 3). Here the deformation field is the final position of the voxel after it has been transformed, i.e. it is the initial position of the voxel + the displacement of the voxel.
Now I need to interpolate a given point in physical space from this deformation vector field. How can I accomplish this ? Could you please give an example code ? For example I want to interpolate [717.89, 433. , -126.78] point which is in physical space from this DVF. How can I achieve this ?
I highly appreciate your willingness to help me out on this issue.