ResampleImage for 4D data

My goal is to upsample datasets (both 3D and 4D). ResampleImage was able to upsample 3D data, but gave an error when i tried upsampling 4D data.

**Are there any solutions or alternatives for this?? **

The command i used was

ResampleImage 4 BOLD_roi.nii.gz BOLD_roi_rs.nii.gz 0.2x0.2x0.2 0 4

and this was the error:

terminate called after throwing an instance of ‘itk::ExceptionObject’
what(): /usr/local/build/staging/include/ITK-5.2/itkImageFileWriter.hxx:254:
itk::ERROR: itk::ERROR: ImageFileWriter(0x3432770): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0x7ffc34b78de0)
Dimension: 4
Index: 0 0 0 0
Size: 0 0 0 0
Largest possible region: ImageRegion (0x7ffc34b78e60)
Dimension: 4
Index: [0, 0, 0, 0]
Size: [0, 0, 0, 0]

Thank you

Which ResampleImage code are you using?

I think the one that cmes inbuilt with ANTs. I had recently updated, so I am sure that i running the latest version of ANTs

The ANTs GitHub is the right place for this question. I now see that you already asked it there, and it was answered too.