Resizing and padding nifti images

I have 3 fMRI images of .nii format that I need to resize so that they are the same shape and still properly overlay one another. The ROI and mask images are 3D binary images and there is a 4D functional image file. What is the best way to pad the images so that they are all the same shape so that the images still properly overlay one another?

(Note: the files are being used to calculate functional connectivity gradients using a method (GitHub - koenhaak/congrads: Congrads is a data-driven method for mapping the spatial organisation of connectivity within a pre-defined region-of-interest (i.e. connectopic mapping) and fitting the results with a spatial statisical model that summarises the map in terms of a limited number of trend surface model coefficients.) that requires that all of the images be the same shape).