avoid clipping with 3dAllineate

Hello,
In a ME-fMRI preprocessing, we want to apply the spatial transformation estimated with 3dvolreg in the first TE to the rest of the echoes using 3dAllineate. However, we observe that the bottom slices of the echoes are cut after 3dAllineate, probably due to the rotation.

Here is the code:


3dvolreg -Fourier -base M0.nii -1Dfile bold_epi_eco1_mcf.1D -1Dmatrix_save
bold_epi_eco1_mcf.aff12.1D -zpad 2 -prefix bold_epi_eco1_mcf.nii bold_epi.eco1.nii

for eco in 1 2 3
do 
3dAllineate -base M0.nii -final cubic -1Dmatrix_apply bold_epi_eco1_mcf.aff12.3D -prefix bold_epi_eco${eco}_mcf.nii bold_epi_eco${eco}.nii
done

We have tried zero-padding the base dataset or adding -zpad in 3dvolreg without success. I thought that setting -base or -master to M0.nii would avoid this, but it isn't working. What is the solution to avoid this clipping?

Thank you very much,
César

Hi, César-

If you change -base .. to -master .. in 3dAllineate, does that sort out the issue?

Alternatively, if you first zeropad your input to 3dAllineate by a few slices (using 3dZeropad, which will increase the overlap of the source and base grids), does that sort it out?

--pt