FourierShift3D function for subvoxel shifting of the final output matrix