I am attempting to nonlinearly transform T1 images and their previously aligned EPI datasets to MNI space. Should I use auto_warp.py on the T1 and EPI datasets individually, or should I use auto_warp.py on the T1 images and then use 3dNwarpApply on the EPI data with the -nwarp ‘anat_un.aff.qw_WARP.nii’ option? This is new for me, so thanks for your help.
You should use auto_warp.py[/url] to normalize your T1 to MNI space. And then use [url=https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dNwarpApply.html]3dNwarpApply to apply that transform to your EPI data.
There is a new tool: @SSwarper[/url] that will take care of the skull stripping and nonlinear warping (via 3dQwarp) your T1 to MNI space, and then you can use 3dNwarpApply to apply the transformation to your EPI dataset. You’ll see in the help, there are also hooks in [url=https://afni.nimh.nih.gov/pub/dist/doc/program_help/afni_proc.py.html]afni_proc.py for taking the output of @SSwarper and doing all the other processing on your EPI datasets.
-Peter
Thank you. I am having trouble finding the correct 3d warp dataset to use with the -nwarp option in 3dNwarpApply. I tried the following: 3dNwarpApply -nwarp anat.un.aff.qw_WARP.nii (from auto_warp.py), but the output’s alignment is way off.
It’s unclear to me where I can find the correct 3d warp transform to apply to my epi data. Is this dataset available in the auto_warp.py output?
The auto_warp.py result has 2 transformations, an affine and a non-linear one, and they need to be concatenated. In your case, expect to do something like:
3dNwarpApply ... -nwarp "anat.un.aff.qw_WARP.nii anat.un.aff.Xat.1D" ...
You can also see how this is handled in the context of an afni_proc.py script, in AFNI_data6/FT_analysis/s17.proc.FT.rest.11.
- rick
I noticed that you didn’t include the “-align_opts_aea -cost lpc+ZZ” option in the above script.
Is there a reason for not including this?
This option is included in afni_proc.py example 11.
-Morgan
Those files should be updated to match the current help, I
do not always think to do that. lpc+ZZ is what I generally
recommend.
Thank you for looking closely.
- rick
Hi AFNI Experts,
I had a subject that I ran auto_warp.py once and the outputs had some line/vein artifacts. I took that output and ran auto_warp.py once more and the results came out great. When I concatenated the second set of transforms to apply to the original output of the first auto_warp.py things looked great. (3dNwarpApply -nwarp ‘anat.rw.qw_WARP.nii anat.aff.Xat.1D’ -source …/anat.aw.nii -prefix anat.final.nii. -interp wsinc5).
The problem comes when I want to concatenate all sets of warps together (3dNwarpApply -nwarp ‘anat.rw.qw_WARP.nii anat.aff.Xat.1D …/anat.rw.qw_WARP.nii …/anat.aff.Xat.1D’ -source …/anat.nii -prefix anat.final1.nii -interp wsinc5) I still get some line/vein artifact. I would like to combine all transforms so I can apply this warp to other data such as the T2 or BOLD imaging etc.
I also tried to run auto_warp.py (second time) and pass an -iniwarp of the original anat.rw.qw_WARP.nii anat.aff.Xat.1D and then a second time turning affine off so I just get a nonlinear warp and running with iniwarp and in all cases I still get the artifact. The only way this does not occur is if I warp the files once using the original transform and then warping that output again using the newer warp/affine parameters. Could it be a precision error when using a small patch size(minpatch 5) and combining warps? Does 3dNwarpApply use the affine matrix as part of the qform/sform in the same fashion as when writing the file out?
Is there a different way to implement combining warps when using multiple sets of transforms or better way to use iniwarp? I played around with adding IDENT(anat.aw.nii) and different combos of this with no success.
Any suggestions would be much appreciated.
Best,
Ajay
Have you taken a look at either 3dNwarpCat[/url] or [url=https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dNwarpCalc.html]3dNwarpCalc?
I tend to use 3dNwarpCat more, and then you can apply it with 3dNwarpApply.
Hi Peter,
I also tried using 3dNwarpCat to combine the transforms and warp and had the same issue. Do 3dNwarpCat and 3dNwarpCalc function differently? I
Best,
Ajay
I don’t understand what you mean by “line/vein” artifact. Do you mean that you get some WM squished down to little tiny threads?