AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
August 08, 2021 09:51AM
The 3dmaskdump command does not have direct atlas region output, but you can get the results you want with just one more command. Besides the AFNI GUI, whereami can be used on the command line to generate tables of atlas ROIs from sets of xyz coordinates. The xyz coordinates should be either RAI/DICOM order by default (also 3dmaskdump output's orientation order), or LPI/SPM order with the -lpi option. You may restrict the list of atlases queried by either supplying a specific atlas name on the command line or by setting the AFNI_ATLAS_LIST environment variable. Take this example lifted from afni11_roi.pdf from some our class documentation.

3dClusterize -clust_nvox 200 -bisided -8.0 8.0 -ithr 2 -idat 1 -NN 1 -inset func_slim+orig. -quiet > visual_clusters.1D
whereami -coord_file visual_clusters.1D'[1,2,3]' -tab 

cat visual_clusters.1D 
   3308    1.4   71.2    4.6  -63.2   63.3  -10.0   94.5  -17.7   33.3   1.6939   0.0218   10.378   30.3   83.5   15.3 
    707   -3.5   72.3   20.0  -24.7   22.1   56.0   86.2  -11.7   54.3  -0.8994   0.0164  -3.2158   -2.7   64.2   36.3 
    335  -60.8   11.0   12.7  -74.2  -43.9  -12.8   34.0    3.3   24.3   1.0238   0.0302   3.5243  -71.4   17.5   12.3 

whereami -coord_file visual_clusters.1D'[1,2,3]' -tab 
++ Input coordinates orientation set by default rules to RAI
+++++++ nearby Atlas structures +++++++

Original input data coordinates in TLRC space

Focus point (LPI)                       Coord.Space 
 -1.40 mm [L], -71.20 mm [P],   4.60 mm [S]     {TLRC}                                                          
 -1.41 mm [L], -73.55 mm [P],   1.12 mm [S]     {MNI}                                                           
 -1.41 mm [L], -77.55 mm [P],   6.12 mm [S]     {MNI_ANAT}                                                      
Atlas           Within  Label                                   Prob.   Code
MNI_Glasser_HCP_v1.0    0.0     L_Primary_Visual_Cortex                  MPM    1  
MNI_Glasser_HCP_v1.0    2.0     L_Second_Visual_Area                     MPM    4  
MNI_Glasser_HCP_v1.0    2.0     R_Primary_Visual_Cortex                  MPM    1001
MNI_Glasser_HCP_v1.0    4.0     R_Second_Visual_Area                     MPM    1004
Brainnetome_1.0 0.0     rCunG_left                               MPM    191
Brainnetome_1.0 2.0     rCunG_right                              MPM    192
Brainnetome_1.0 5.0     rLinG_left                               MPM    195
Brainnetome_1.0 7.0     vmPOS_left                               MPM    197
Brainnetome_1.0 7.0     cLinG_right                              MPM    190
CA_ML_18_MNI    0.0     Left Lingual Gyrus                       ---    47 
CA_ML_18_MNI    3.0     Right Lingual Gyrus                      ---    48 
CA_ML_18_MNI    5.0     Left Calcarine Gyrus                     ---    43 
CA_ML_18_MNI    6.0     Cerebellar Vermis (6)                    ---    112
CA_ML_18_MNI    6.0     Right Calcarine Gyrus                    ---    44 
...


The clusterize command generates a list of coordinates (the "quiet" option removes the header lines), with one xyz coordinate for each cluster's center of mass. The whereami command can then take those coordinates and produce the table of regions at or near those coordinates. Limiting the report to exact matches at a voxel or to a particular atlas can be done with additional options. For example,

whereami -coord_file visual_clusters.1D'[1,2,3]' -tab -atlas MNI_Glasser_HCP_v1.0 -max_search_radius 1


Original input data coordinates in TLRC space

Focus point (LPI)                   	Coord.Space 
 60.80 mm [R], -11.00 mm [P],  12.70 mm [S]	{TLRC}                                                          
 61.41 mm [R], -11.98 mm [P],  13.19 mm [S]	{MNI}                                                           
 61.41 mm , -15.98 mm [P],  18.19 mm [S]	{MNI_ANAT}                                                      
Atlas          	Within	Label                           	Prob.	Code
MNI_Glasser_HCP_v1.0	0.0	R_Area_OP4/PV                   	 MPM	1100


You may also use the whereami command to look up atlas ROIs with

whereami -atlas MNI_Glasser_HCP_v1.0 -show_atlas_code

Some more tips and tricks are shown in the ROI and templates/atlases handouts here:

[afni.nimh.nih.gov]
Subject Author Posted

Voxel time series with ROI labels

Muhammad Shahzaib August 05, 2021 05:58AM

Re: Voxel time series with ROI labels

Daniel Glen August 08, 2021 09:51AM