Interpolate a given point from nifti DVF image volume

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.

I extract the physical coordinates xyz in mm of the nifti DVF image volume using below code.

import numpy as np
import nibabel as nib

dvf_img = nibabel.load('./change_0_DVF0000.nii.gz')
shape, affine = dvf_img.shape[:3], dvf_img.affine
coords = np.array(np.meshgrid(*(range(i) for i in shape), indexing='ij'))
coords = np.rollaxis(coords, 0, len(shape) + 1)
mm_coords = nib.affines.apply_affine(affine, coords)

But now I want to interpolate the deform vector field of any given coordinate in phsyical space from the DVF image volume.

I’m looking for a solution to this. Please some one let me know any steps that I have needed to be done ?

highly appricaite your willingness to help me out on this issue.