That is close, but you’ll need to use SimpleITK/ITK to read the NIFTI deformation field to preserve all the metadata.
You can see an example here using the sitk.DisplacementFieldTransform
with a displacement field image:
https://simpleitk.readthedocs.io/en/master/link_DemonsRegistration1_docs.html