Converting anatomical template from Talairach to MNI

AFNI version info (afni -ver):
Version AFNI_24.0.17 'Caracalla'


Code in question:
3dwarp -tta2mni -prefix 65template_mni.nii 65template.nii

ANTS alignment via "WarpImageMultiTransform" did not produce a favorable outcome using subject-specific functionals and a high-resolution anatomical template. I then realized that the subject-specific functionals were in MNI space, while the template was in Talairach (discovered in FSLeyes). I am assuming this caused the alignment issues observed with ANTS.

I am now trying to convert my template from Talairach to MNI space, for subsequent use in "WarpImageMultiTransform" with the subject-specific functionals. I have applied the following to my template:

3dwarp -tta2mni -prefix 65template_mni.nii 65template.nii

This process completes without error, and 3dinfo then returns "MNI" as the template space for the converted version of the template. However, the AFNI viewer still refuses to recognize it as so and loads the dataset in Talairach space then does not allow me to overlay the subject-specific functionals that are in MNI space.

I have also tried 3drefit and 3dresample to correct this, but to no avail. Code used here:

3drefit -view MNI -space MNI 65template_mni.nii (*errors out - "argument after -view is illegal")

3dresample -master deconv_test1_ANTS_resampled+orig -inset 65template_mni.nii -prefix 65template_mni_resamp.nii (*completes without error)

Could someone please advise on how to properly convert my template from Talairach into MNI space in a manner also recognized by AFNI?

I am hoping this correction will allow me to run the template through ANTS alignment with an improved subject-to-template outcome.

AFNI requires the NIFTI header to correctly specify the dataset is in a standard space with the sform_code or the qform_code. Setting the space with 3drefit is sufficient to update the header of the NIFTI dataset with the correct codes and for AFNI to display the dataset with other MNI, Talairach or other "standard space" datasets. The view option is mostly for AFNI datasets to force the view to be either "orig" or "tlrc". There is no "mni" or "MNI" option for view. As with all AFNI commands, the options are probably best described in the command line help for the command, 3drefit -help.

3drefit -space MNI 65template_mni.nii myMNIdset.nii

3dresample, 3dAllineate, 3dWarp, 3dQwarp, 3dNwarpApply and other commands that take -master will use the space of that dataset for the output.

Converting between Talairach and MNI spaces has been addressed multiple on the message board. Take a look at one of these previous posts:

Note, as in that post, neither Talairach space nor MNI space is very specific to a particular template. Furthermore, that 3dWarp -tta2mni is just an approximation that is mostly outdated by the other methods. It seems if you want a high resolution output in MNI space, consider a high resolution MNI template as the target to begin with.

Hi, Daniel. Thank you for your quick and detailed response. Much appreciated.

I tried 3drefit as suggested, but subject EPI to anatomical template alignment remains considerably off. See here:

Any other ideas on how to correct course? Or could there be another issue at hand?

Thank you for your time.

Applied script for subject to template alignment pasted below in case it is of use: