Problems applying 3dNwarpApply

Hi guys,

I am doing a functional to MNI transformation and therefore applying realigment+inv(anat to functional)+anat to MNI in one 3dNwarpApply. My problem is that using the MNI template as master and preserving the voxel size (3mm) the grid of my image is different. Here the 3dNwarpApply command:

3dNwarpApply -master $TEMPLATEDIR/$TEMPLATE -overwrite -dxyz ${VOXELRESZ}
-source pb03.${SUBJ}.blip.nii.gz
-nwarp “anat.un.aff.qw_WARP.nii.gz mat.warp.aff12.1D”
-prefix pb04.${SUBJ}.volreg.${TSPACE}.nii.gz
++ 3dNwarpApply: AFNI version=AFNI_18.2.16 (Sep 12 2018) [64-bit]
++ Authored by: Zhark the Warped
** AFNI converts NIFTI_datatype=64 (FLOAT64) in file /export/home/vferrer/public/PARK_VFERRER/TEMPLATES_ATLAS/MNI152_2009_template_FSL.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ -master dataset is ‘/export/home/vferrer/public/PARK_VFERRER/TEMPLATES_ATLAS/MNI152_2009_template_FSL.nii.gz’
++ output grid size = 3 mm
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as pb03.sub-012ParkMbaaPb.blip.nii.gz,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:pb03.sub-012ParkMbaaPb.blip.nii.gz is 10.099990 degrees from plumb.
++ opened source dataset ‘pb03.sub-012ParkMbaaPb.blip.nii.gz’
++ Processing -nwarp
++ Warping:…Z
++ Output dataset ./pb04.sub-012ParkMbaaPb.volreg.MNI.nii.gz
++ total Elapsed time = 918.6 sec

Also the volume dimensions before and after the transformation:
3dinfo -n4 pb04.sub-012ParkMbaaPb.volreg.nii.gz
64 64 42 703
3dinfo -n4 pb04.sub-012ParkMbaaPb.volreg.MNI.nii.gz
61 73 61 703
This is also affecting the TR of the output image. Do you know how can I solve this issue keeping the original dimesions. I have tried by not putting a master, but then part of the brain is not shown.

This looks pretty reasonable to me. Your output is in MNI space, over the field of view of the template you specified and with 3mm 3 voxels. What you may want instead is an “autoboxed” version of your 3mm3 output. Use 3dAutobox or 3dZeropad to create the box you want. Another trick is to transform a volume of just '1’s and transform that. Then use 3dAutobox with that. The resulting box can be used for your master datasets for this subject and for other subjects.