Go to atlas location

Dear Colleagues,

Hi. I have a problem with the “Go to atlas location” AFNI feature. Please correct any statements that are misunderstandings along the way.

At first, I had no environment variables set. I would use
TT_N27_SSW.nii.gz
as my underlay and
TT_N27_EZ_ML+tlrc.*
as my overlay. Fun. Great. If I wanted to use “Go to atlas location,” I could use the default TT_Daemon to roughly go somewhere, and it worked.

I then learned that
TT_N27_EZ_ML+tlrc.*
is sort of depreciated. Logical because it is not listed anywhere in this
AFNI_atlas_spaces.niml
file. I should instead use this
TT_caez_ml_18+tlrc.*
dataset. I say sort of because the macrolabels are the same (Re: Atlas TT N27 EZ ML in AFNI directory). My first problem was I still needed to use the depreciated file because the macrolabels would not appear in AFNI when clicking on the region. This
(base) picchionid@raid ~> 3dinfo -labeltable /misc/prog/afni/current.x86_64/TT_caez_ml_18+tlrc.HEAD
NO_LABEL_TABLE
is consistent with that potential problem.

I then added
AFNI_ATLAS_LIST = CA_N27_ML
AFNI_ATLAS_COLORS = CA_N27_ML
to my .afnirc file because in
AFNI_atlas_spaces.niml
CA_N27_ML is the atlas name for that dataset. Now I use
TT_caez_ml_18+tlrc.*
as the overlay. This solved the problem where macrolabels would not appear in AFNI when clicking on the region. However, when I now try to use “Go to atlas location,” all the coordinates are 0, 0, 0 as show in the attached screenshot. What happened?

Sincerely,

Dante

That atlas is missing the center locations (see 3dinfo -atlas_points). I can add them with the following script. Try out the resulting dataset with the script and setting AFNI_ATLAS_COLORS to this “session atlas” for now ( setenv AFNI_ATLAS_COLORS TT_caez_ml_1.8 ). If it looks alright, I can update the standard distribution version. The atlas making script uses 3dCM to compute centers. Here it’s using the internal center, the voxel location inside the region that is closest to the center of mass.

#!/bin/tcsh
mkdir tempml18_update
cd tempml18_update

copy the old atlas

3dcopy ~/abin/TT_caez_ml_18+tlrc. TT_caez_ml_18_relabel.nii.gz

get the labels by themselves

3dinfo -atlas_points ~/abin/TT_caez_ml_18+tlrc. | grep “STRUCT=” | awk -F= ‘{print $2}’ > mllabelsonly.txt

rm ml_index_label.txt

get the index for that label

set nl = wc -l mllabelsonly.txt
foreach labeli (count 1 $nl[1])
set label = head -$labeli mllabelsonly.txt|tail -1
set index = 3dinfo -atlas_points ~/abin/TT_caez_ml_18+tlrc. | grep -A 1 "$label" | grep VAL= | awk -F= '{print $2}' | tr -d \"

replace the spaces with underscores

set label = echo $label| tr " " "_"
echo $index $label >> ml_index_label.txt
end

make atlas

@Atlasize -lab_file ml_index_label.txt 1 0 -lab_file_delim "
-atlas_type S -atlas_name TT_caez_ml_1.8
-atlas_description “Updated Eickhoff-Zilles Macrolabel atlas”
-dset TT_caez_ml_18_relabel.nii.gz -centers -centertype Icent -skip_novoxels

try out the atlas in AFNI

setenv AFNI_ATLAS_COLORS TT_caez_ml_1.8
or
afni -D AFNI_ATLAS_COLORS=TT_caez_ml_1.8

1 Like

Daniel,

Hi. This looks very alright to me. Thanks, friend.

Sincerely,

Dante

You’re very welcome, of course. Thanks for noticing this and letting me know this worked out.

1 Like

I’ve updated the various versions of this atlas - TT, MNI and MNIa versions of the macrolabel atlas.

1 Like