description of output files

Hi all,

I've run with the following command -base MNI152_2009_template.nii.gz -input T1.nii.gz -suffix _al_MNI -overwrite

I've got the following output files in ./awpy, but I am not sure what some of the 1D files are:

anat.nii # T1 image in original space
anat.un.nii # T1 image in original space after 3dUnifize
base.nii # MNI template
anat.un.aff.nii # T1 image in MNI space after affine transformation?
anat.un.aff.qw.nii # Warped T1 image in MNI after nonlinear warping, i.e. final output anat.un.aff.qw_WARP.nii # Warping coefficients (3 volume brick)


My issue is that I want to compute the inverse transformation from MNI to T1 space with 3dNWarpCat, but I don't manage to get it right. Could you please help me?

Thank you very much

Salve, Cesar!

How about:

# create the one-line version of this initial shift:
cat _matvec -ONELINE anat.un_AFN_OYmeqfZ3JqF7n9LNC7gDAA_shft.1D \
    > anat.un_AFN_OYmeqfZ3JqF7n9LNC7gDAA_shft_ONE.1D

# the warp, concatenating everything to go from src->base, 
# and then inverting it
3dNwarpApply                                                                 \
    -overwrite                                                               \
    -master     anat.nii                                                     \
    -source     MNI152_2009_template.nii.gz                                  \
    -nwarp      "anat.un.aff.qw_WARP.nii anat.un.aff.maskwarp.Xat.1D anat.un_AFN_OYmeqfZ3JqF7n9LNC7gDAA_shft_ONE.1D" \
    -iwarp                                                                   \
    -prefix     TEST3

I leave the prefix filename in there, because it was not obvious how to do this.


Oh, and if you want the 3dNwarpCat command to create the full inverse warp:

# concatenation to make new warp, but see comment below
3dNwarpCat \
     -warp1 "anat.un.aff.qw_WARP.nii" \
     -warp2 "anat.un.aff.maskwarp.Xat.1D" \
     -warp3 "anat.un_AFN_OYmeqfZ3JqF7n9LNC7gDAA_shft_ONE.1D" \
     -iwarp \
     -prefix FULL_WARP_INV.nii.gz

# and then apply
3dNwarpApply \
     -master anat.nii \
    -source MNI152_2009_template.nii.gz \
    -prefix TEST4 \
    -nwarp FULL_WARP_INV.nii.gz

Comment: doing this initially led to my warped result being cropped a little bit. I think I would directly do the 3dNwarpApply command, from the prior post. But if you want to go this route, you might need to add -expad .. to the 3dNwarpCat command, to expand the warp size.


thank you so much Paul

Great, glad that worked.

We should definitely have this in the help, will add it there soon. Thanks for asking about this.