Hi @dzenanz, thanks for responding!
Just to make sure, do you mean something like:
import SimpleITK as sitk
import nibabel as nib
# Load nifti warp
img = nib.load(nifti_file)
data = img.get_fdata()
# Define and save ITK warp
displacement_image = sitk.GetImageFromArray(data, isVector=True)
tx = sitk.DisplacementFieldTransform(displacement_image)
sitk.WriteTransform(tx, "out_warp.h5");
Best,
Steven