TT_152_2009c to MNI152_T1_2009c

Dear AFNI experts,

I extracted some masks of my interest from the DD_Desai_MPM (TT_desai_DD_MPM+tlrc) atlas, but my functional data were normalized to the MNI152_T1_2009c. Could anyone please let me know if there is a way that I can convert the mask in the mask from the TT space to the MNI152 or do I need to rerun the proc py using TT_152_2009c as a basis? Thank you in advance for your help!

Best,
JW

Neither MNI nor Talairach space is not one specific space, but each corresponds to a kind of family of spaces. MNI has about a dozen popular variants. The Desai atlases were made using AFNI’s @auto_tlrc function by alignment to the TT_N27 space. Consequently, the atlas is the TT_N27 variant of Talairach space.

Consider the following options to transform data or coordinates between MNI and Talairach spaces :

  1. Affine, 2-piece affine and 12-piece affine transformations to go from generic Talairach to generic MNI.
    https://afni.nimh.nih.gov/afni/community/board/read.php?1,157350,157357#msg-157357
    https://afni.nimh.nih.gov/afni/community/board/read.php?1,75269,75394#msg-75394
  2. 12-piece affine to go from TT_N27 to MNI_N27, and MNI_N27 to TT_N27.
    https://afni.nimh.nih.gov/afni/community/board/read.php?1,164385,164470#msg-164470
    https://afni.nimh.nih.gov/afni/community/board/read.php?1,157350,157357#msg-157357 (same as in #1)
  3. Affine+nonlinear warp to go from TT_N27 to MNI_2009c
    https://afni.nimh.nih.gov/pub/dist/atlases/MNI_Desai/
  4. Use FreeSurfer parcellations for MNI_2009c instead of Desai atlases. See aparc+aseg+REN_all.nii.gz in compressed file below.
    https://afni.nimh.nih.gov/pub/dist/tgz/suma_MNI152_2009.tgz

Hi Daniel,

Thank you so much for the instruction. I’ll try one of those.

Best,
JW

Hey Dglen,
Sorry to reopen this thread, but I'm wondering how to put the TTN27_to_MNI152_2009c to use?

I have a sample of L1 datasets that use the same task as another set of datasets, however set 1 is in TT_N27 space and set 2 is in MNI_2009c_asym space. I tried following the following steps per this discussion thread and ended up with both a _short and _float file that aren't capable of p-thresholding:

  • 3dcopy /usr/local/abin/MNI152_2009_template_SSW.nii.gz /usr/local/abin/MNI152_2009_template_SSW+orig
  • 3dcalc -a stats.$subj+tlrc'[FB.Like.Win#0_Coef]' -prefix Soc.FB.Rew.Pos_TTN27_short -expr a -datum short -gscale
  • Running this ^ spit out the following error: ++ 3dcalc: AFNI version=AFNI_24.1.19 (Jun 14 2024) [64-bit]
    ++ Authored by: A cast of thousands
    *+ WARNING: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    *+ WARNING: Soc.FB.Rew.Pos_TTN27_short+tlrc[0] scale to shorts mean misfit error = 10.1% -- * Caution
    + a) Numerical precision has been lost when truncating results
    from 32-bit floating point to 16-bit integers (shorts).
    + b) Consider writing datasets out in float format.
    In most AFNI programs, use the '-float' option.
    + c) This warning is a new message, but is an old issue
    that arises when storing results in an integer format.
    + d) Don't panic! These messages likely originate in peripheral
    or unimportant voxels. They mean that you must examine your output.
    "Assess the situation and keep a calm head about you,
    because it doesn't do anybody any good to panic."
  • 3dcalc -a stats.s010+tlrc'[FB.Like.Win#0_Coef]' -prefix Soc.FB.Rew.Pos_TTN27_float -expr a -datum float -gscale
  • Never got to ran this, but this was my plan: 3dfractionize -input Soc.FB.Rew.Pos_TTN27_short+tlrc -preserve -warp /usr/local/abin/TT_N27+tlrc -prefix Soc.FB.Rew.Pos_MNIresample_short -template /usr/local/abin/MNI152_2009_template_SSW+orig

Any pointers for how to proceed? Thanks so much

This doesn't really have anything to do with the spatial transformations. I think you can leave out the "-datum short -gscale" because that won't work well with multiple statistical subbrick volumes. I'm not sure you need the copy of the MNI template either.

Thanks! I listed a couple different commands here, but I think you're referencing the use of 3dcalc to create a short file from a single sub-brick of a stats+tlrc file.

i was under the impression that I could use the -warp flag with 3dfractionize to apply an inverse transformation on a dataset (a multi sub-brick stats dset) and then use the -template flag to apply a new transformation to a template (in +orig space, or else face the wrath of an "illegal" error). I also thought I would need to use the -preserve flag to maintain signal from each voxel, not just change the grid. This flag requires that the input dataset is in short or float form. Hence, why I did the 3dcalc stuff as a precursor and specified a single sub-brick, which does indeed have nothing to do with spatial transformation.

Is 3dfractionize not the best option for transforming a stats dset out of TT_N27 space and into MNI152_2009 space? Do I need to go back to square one and rerun level1 preprocessing on the dataset such that the afni_proc.py script references my template of interest?

3dfractionize only works with affine and manual (12-piece) transformations, so it won't work with the nonlinear transformation there. The preserve option is useful there for atlases to preserve ROI values and avoid interpolation, not for statistical datasets.

Transformations of an atlas from TT_N27 space can be done with the 3dNwarpApply command instead.

3dNwarpApply -nwarp 'anatQQ.sub007_WARP.nii anatQQ.sub007.aff12.1D'  \
  -master MNI_template.nii.gz
  -prefix my_xformed_dset_MNI.nii.gz -source mydset.nii.gz

Add -ainterp NN to do nearest neighbor interpolation for ROIs and atlas datasets. The indexing will match the original atlas, so you can also copy labels over with

3drefit -copytables some_atlas.nii.gz atlas_native.nii.gz
3drefit -cmap INT_CMAP atlas_native.nii.gz

Still, it is simpler and more accurate to use an atlas in its native space usually, so redoing the processing with the template and atlas you want seems like a good idea.

Thanks so much for these clear summaries of the commands, I really appreciate it! Makes a lot of sense. I'll use both approaches.