Schaefer atlas for DTI tractography

I am using the Schaefer 400 parcels (17 networks) atlas as my ROIs for tractography using 3DTrackID. Here is my current workflow:

mri_surf2surf → resample Schaefer parcellation from fsaverage subject onto subject of interest

FSread_annot → convert annot file to Suma-usable niml.dset format

SurfToSurf → register niml.dset from original surface onto standard mesh of linear density 20, 60, and 141

fat_proc_map_to_dti → align standard mesh niml.dset data to DTI space

3dSurf2Vol -->map surface data to volume using “mode” map_func along smoothwm

3dROIMaker → grow volumetric parcels based on wm_skeleton of dt_FA according to 0.2 threshold

The main problem with this workflow is that the Schaefer volumetric ROIs that I am creating are extremely irregular and do not look great. I also haven’t loaded in the atlases, so I cannot use the whereami function. I noticed that you have released a new Schaefer atlas this year in MNI152_2009 space. I’m not sure how to incorporate these files into my set-up. Can I use the nii.gz files that you provided and transform those into my DTI space and then run 3dtrackid with those parcels? Or should I use the std141*niml.dset files that you provided and use SurfToSurf to register those with my subject and then continue with my previous workflow? I would like to eventually get to a point where I have niml.dset files to view these parcels on the surface but also volumetric files to run 3dtrackID with.

I am very new to AFNI, but I have watched all of the MIT bootcamp videos on DTI/FATCAT, SUMA, and ROIs/Atlases. Yet, I still feel confused on how to transform all of these files, and I am working with a pipeline that was made before I joined the project. Any help will be appreciated! Thanks.

Just in case you didn’t find the modified Schaefer-Yeo atlas,

The irregularity of those regions in both surface and volumes led to those modifications we worked on with Thomas Yeo’s group.

For DTI analysis, you may want to move the atlas ROI into your native space via the std141niml.dset files. Those are on a “standard mesh” that can be shared across subjects’ surface datasets on the same standard mesh. The way I recommend then is to project those std141niml.dset files into the volume using @surf_to_vol_spackle. You can dilate the cortical ribbon mask to expand into the white matter or follow Paul’s procedure for expanding into the white matter with 3dROImaker, or @ROI_modal_grow.

Do I use the std mesh surfaces that are in the “surfatlas” folder or the “surfsets” folder?

To make sure I understand, since these files are already on the standard mesh, I do not need to modify them before visualizing them directly on each subject’s FreeSurfer surfaces. These surfaces should look slightly different for each subject on SUMA because their cortical gyri and sulci are not identical, but the parceI associated with each node/vertex on the standard mesh should be identical for every subject. In other words, I don’t need a different std.141.*niml.dset file for each subject. And then I will take these std.141. surfaces and bring them into diffusion tensor space for each subject which will cause them to differ slightly among subjects, and then I can use the @surf_to_vol_spackle function. Is this all correct?


You have it all right. For every parcellation, there are several versions of the niml.dsets, and all of them should be equivalent for processing. For visualization, there are some differences:

  1. surfatlas directory have no colormaps assigned, so in suma you would assign a color map yourself with the Cmp button
  2. surfsets has two versions - lbl.niml.dset and cmap.lbl.niml.dset. The former has the color map from the original Schaefer-Yeo colors. The latter uses the Glasbey1024 colormap. The Glasbey colormap helps to discriminate colors across regions. The original SY colors tries to use very similar colors within broad regions of the brain.

Below I have included the code that I am using to convert the niml.dset data (in dt space) to the volumetric space and then convert it to ROIs using 3dROI maker. My plan is to do this for both hemispheres and then merge those hemispheres together using 3dcalc. However, since 3dROImaker inflates each hemisphere by 3 voxels up to the regions with FA>0.2, the ROIs inflate across the midline and overlap with one another. What is the best way to make a mask of each hemisphere? I was thinking about using 3dSurfMask -i_gii indt_std.141.pial.gii, but I’m not sure what grid_parent means. When I set grid_parent to my dt_FA.nii.gz, I get this error:

Error SUMA_3dSurfMask_ParseInput (SUMA_3dSurfMask.c:192):
Grid parent …/…/DTparams/dt_FA.nii.gz does not exist (7).

Let me know what you think the best way to proceed will be in order to combine these hemispheres. And also if you have any feedback on my current @surf_to_vol_spackle + 3dROIMaker set-up, then let me know! Thanks.

for hemi in 'rh' 'lh'; do

@surf_to_vol_spackle 									  		   \
    -maskset 	indt_${hemi}    				   \
    -spec 		indt_std.141.${hemi}.spec			      				   \
    -surfA 		indt_std.141.${hemi}.smoothwm.gii 		  		           \
    -surfB 		indt_std.141.${hemi}.pial.gii 			  				   \
    -surfset 	"${bn}"_order.smooth3mm.cmaplbl.niml.dset 		           \
    -mode														   \
    -prefix 	        "${bn}"

3dROIMaker                                                                           \
    -inset 			$gm_parc 		                                \
    -refset 			$gm_parc 		                                \
    -prefix 			${roi_dir}/$bn 					        \
    -inflate 		3								\
    -mask 			${param_dir}/dwi_mask_e2.nii.gz           \
    -wm_skel 		${param_dir}/dt_FA.nii.gz 		        \
    -skel_thr 		0.2 							        \
    -skel_stop_strict 								 	\

Good progress and only some minor issues here! To make sure you only get left or right on the dilated sides, use left and right masks and apply them with 3dcalc combined with the atlas regions you have grown into the volume. Doing this one hemisphere at a time is more straightforward. The Freesurfer output includes the left, right cortical ribbons, and the left, right cerebral white matter regions(1,21) are in the @SUMA_Make_Spec_FS suma directory output in the renumbered output. Combine the dilated and left-right masked label datasets.

Thanks for the suggestion! Here is the code I ended up using:

        # base name for Schaefer parcellation

        # iterate over both hemispheres
	for hemi in 'rh' 'lh'; do

                # get hemi cerebral WM parcel from aparc.a2009s+aseg parcellation
                if [ $hemi == 'lh' ]; then

		# only allow voxels to be present within GM ribbon or WM space (from aparc.a2009s* parcellation)
		3dcalc 										  	  			  \
		        -a ../   \
			-b indt_${hemi} 	  			  \
			-c "${roi_dir}"/"${bn}"_GMI.nii.gz		      			  \
			-expr "c*bool(equals(a,$wm_parcel)+b)" 		  			  \
			-prefix ${roi_dir}/${bn}_GMI_masked.nii.gz


	# file paths

	# merge ROI from both hemispheres (if there is overlap, then set ROI equal to 0)
	3dcalc \
	        -a $gmi_lh -b $gmi_rh	\
	        -expr '(a+ifelse(b,200+b,0))*not(and(a,b))'		\
	        -prefix $gmi_both

I’m mainly uploading this in case a future user needs help doing something similar. The first 3dcalc expression I used is supposed to mask each hemisphere based on only the voxels present in the GM ribbon and WM. As expected, this actually makes the GMI_masked nifti file revert to looking very similar to the GM file. I still feel like this is the correct way to do things though. Thanks for your help, and let me know if you see something that should be changed.

Looks good. Thanks for contributing to the community too.