Export transformed 4D image as nifti?

Hi I would like to apply a bspline transformation I generated with the plastimatch plugin to a 4D image.
That works all fine but afterwards I can no longer export the image in nifti format.
I need the image for further work as nifti.
Is there a way to export as nifti?
I tried to convert the nrrd file afterwards to the nifti format using SimpleITK, but the 4D image becomes a 5D image with an empty fourth dim and the actual forth in the fifth.
I just loaded de nrrd with sitk.ReadImage and saved with sitk.WriteImage.

Thanks for your help,

Are you using Slicer to load the image? You can right click on the node and there should be an option to export. Then you can choose nifti as the export format.

The sitk problem sounds like some dim being misinterpreted as a channel

Hi @ebrahim, thanks for the tip, but there is only the option to export as DICOM and in the save manue I can just select nrrd and nhrd.

I guess that should be the problem with sitk.
Do you have any knowledge about the meta information in the nrrd file?
I’m not to 100% sure to which key they translate in the nifti format.

I’m not familiar with the meta info off the top of my head but feel free to share an example file if you’d like me to poke around