DOI: 10.6084/m9.figshare.4249400.v5
title: HCP-MMP1.0 volumetric (NIfTI) masks in native structural space

description: We in our group received with great interest the publication of the <b>HCP-MMP 1.0 parcellation</b> by Glasser et al. (Nature) created using data from the Human Connectome Project earlier this year. Often in our connectivity pipelines we use volume files for parcellation in native space, so we decided to try and convert the Connectome Workbench files to volume masks in native structural space to try out in future studies.<br>We were happy to find that someone had already gone through the trouble of generating FreeSurfer annotation files projected on fsaverage, so all we had to do was find a way to transform these <i>annot</i> files to each subject’s space and convert them to volume masks.<br>So we wrote this Linux shell script that performs a series of conversion and transformation steps using only FreeSurfer commands. It first converts the annotation files (<b>lh.HCPMMP1.annot and rh.HCPMMP1.annot</b>, downloaded from https://figshare.com/articles/HCP-MMP1_0_projected_on_fsaverage/3498446) to labels using <i>mri_annotation2label</i>, then takes each label from fsaverage to each subject’s space with <i>mri_label2label</i>, converts transformed labels back to annotation with <i>mri_label2annot</i>, and finally converts these to volume files (nii.gz) with <i>mris_label2annot</i>. Seems like too many steps, but this is how we (who are not FreeSurfer experts) got satisfactory results.<br>The default final file consists of a single .nii.gz volume containing the <i>cortical</i> HCP-MMP1.0 regions plus the subcortical regions <i>from the FreeSurfer segmentation</i>, each region assigned a unique voxel value. It should be noted that the HCP-MMP1.0 parcellation includes 180 regions per hemisphere - 179 cortical and one subcortical (hippocampus). In the final volume file, left-hemisphere cortical HCP-MMP1.0 regions will have values between 1001 and 1181, whereas right-sided regions will have values between 2001 and 2181. The correspondence between each specific region and its voxel value is given in a look-up table that is saved in each subject’s output folder. To identify the hippocampi (and other subcortical structures), one needs to check the corresponding voxel value given in the <i>FreeSurferColorLUT.txt</i> file provided with FreeSurfer (https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/AnatomicalROI/FreeSurferColorLUT), as they are generated based on the original aseg parcellation*.<br>*In the previous version of the script, a few perihippocampal cortical voxels were ascribed values (1121 and 2121) that should correspond to the hippocampus in the HCPMMP1.0 parcellation. Since only the cortical regions from this parcellation are generated, these voxels are now assigned the values corresponding to the hippocampus as defined by the automatic FreeSurfer subcortical segmentation (17 and 53).<br>Optionally, one can choose to also generate individual volume files for each cortical and/or subcortical parcellation region. This option requires FSL. If the user chooses to create individual subcortical masks, the <i>FreeSurferColorLUT.txt</i> must also be available in the base (<i>$SUBJECTS_DIR/</i>) folder.<br><br>By default, the script also generates tables with anatomical information for each cortical region (number of vertices, area, volume, mean thickness, etc.).<br><br>Instructions on how to use the script can be found in the script itself, or here:<i>https://cjneurolab.org/2016/11/22/hcp-mmp1-0-volumetric-nifti-masks-in-native-structural-space/</i><br>Hope this can be of use!