which ROI belongs to which network

Hi everybody,

I have a question: I'm using the Craddock atlas with 748 ROIs and I would like to have the center of mass of each of this ROI associated to one of the network of the Yeo 7-network atlas.

So far I used this command to generate the list of coordinates
3dCM -all_rois dset Craddock748.nii > Craddock748_Coordinates.1D

and I was hoping I could use whereami and feed the coordinates and use the Yeo-7-network atlas; but as it does not exist in the list of atlas; do you know how I could do that?

Thank you very much in advance

PS, is there a way to get the coordinates in LPI format from the 3dCM command?


The Schaefer-Yeo atlases from our site already come with a CustomAtlases.niml file that can be used to define atlas names and files. You should be able to set "AFNI_SUPP_ATLAS_DIR = pathofatlases/afni_sy_atlas" where the "pathofatlases" is where the atlases are installed on your system and the location of that CustomAtlases.niml file.

RAI and LPI only differ by the sign in the x and y. whereami takes RAI as input by default, but the -lpi option changes the input order to LPI. If you want to change the order, you can do that with this short script that works on list of coordinates in RAI order :

cat testRAI.1D
1 2 3
4 5 6
-5 -7 -10
1deval -a testRAI.1D'[0]' -expr '-a' > testLPIx.1D
1deval -a testRAI.1D'[1]' -expr '-a' > testLPIy.1D
1dcat testLPIx.1D testLPIy.1D testRAI.1D'[2]' > testLPI.1D
cat testLPI.1D
-1 -2 3
-4 -5 6
5 7 -10

Also, note that 3dCM finds the center of mass for each region. That will probably be okay for these regions, but for some shapes, the center of mass may actually lie outside the region. Consider the -Icent option for 3dCM to guarantee an internal center - a voxel center within the region that is closest to the center of mass. This poster on centers provides some alternatives:

Oh nice, thank you for the DICOM -> LPI conversion !
and the advicw wiht the -lcent that will definitely help

However I don't think I have any CustomAtlases.niml file, I just downloaded the 7 network atlas and only have a .nii file with it

The various atlases and the CustomAtlases.niml file can be found here: