The following are instructions to use MSM transformations to resample labels and fields between BigBrain from/to the fsaverage template.

FSAVG TO BIGBRAIN

Resample labels from FSAVG surface to BIGBRAIN surface using spherical maps from MSM. This is useful to transfer labels defining a surface parcellation on FSAVG to an individual brain like BIGBRAIN.

MSM spheres needed for resampling

$BBhome = BigBrainRelease.2015/BigBrainWarp_Support (defines your base directory)
$inmesh = $BBhome/BigBrain_to_fsavg/spheres/lh.BigBrain.rot.fsavg.sphere.surf.gii
$refmesh = $BBhome/BigBrain_to_fsavg/spheres/lh.fsavg.sphere.surf.gii
$outmeshMSM = $BBhome/BigBrain_to_fsavg/spheres/lh.sphere_fsavg_rsled_like_BigBrain.sphere.reg.surf.gii
$outmeshMSM_inverted = $BBhome/BigBrain_to_fsavg/spheres/lh.sphere_BigBrain_rsled_like_fsavg.sphere.reg.surf.gii

Invert $outmeshMSM

wb_command -surface-sphere-project-unproject $refmesh $outmeshMSM $inmesh $outmeshMSM_inverted

Input: FS annot (example: lh.aparc.a2009s)

cd $BBhome/BigBrain_to_fsavg/inmap_fsavg_outmap_BigBrain/input
mris_convert --annot lh.aparc.a2009s.annot $BBhome/white_surfaces/lh.fsavg.white.surf.gii ./lh.aparc.a2009s.label.gii

Transform labels from fsavg to BigBrain surface

cd $BBhome/BigBrain_to_fsavg/inmap_fsavg_outmap_BigBrain
wb_command -label-resample input/lh.aparc.a2009s.label.gii $outmeshMSM_inverted $inmesh BARYCENTRIC output/lh.aparc.a2009s.label.gii
wb_command -set-structure output/lh.aparc.a2009s.label.gii CORTEX_LEFT

Sometimes you need to view/edit .label.gii and swap for better midline visibility, replace Label 0 row with:
    <Label Key="0" Red="0" Green="0" Blue="0" Alpha="0"><![CDATA[Unknown]]></Label>

Convert output to .txt

cd $BBhome/BigBrain_to_fsavg/inmap_fsavg_outmap_BigBrain/output
wb_command -cifti-create-label -left-label lh.aparc.a2009s.label.gii lh.aparc.a2009s.dlabel.nii
wb_command -cifti-convert -to-text lh.aparc.a2009s.dlabel.nii lh.aparc.a2009s.label.txt

Convert output to FS .annot

cd $BBhome/BigBrain_to_fsavg/inmap_fsavg_outmap_BigBrain/output
mris_convert --annot lh.aparc.a2009s.label.gii $BBhome/white_surfaces/lh.BigBrain.white.surf.gii ./lh.aparc.a2009s.annot

Visualize

cd $BBhome/BigBrain_to_fsavg/inmap_fsavg_outmap_BigBrain/output
freeview -f $BBhome/white_surfaces/lh.BigBrain.white.surf.gii:annot=lh.aparc.a2009s.annot
brain-view $BBhome/white_surfaces/lh.BigBrain.white.surf.obj lh.aparc.a2009s.label.txt

BIGBRAIN TO FSAVG

Resample a surface field defined on BIGBRAIN surface to the FSAVG surface using spherical maps from MSM. This is useful to resample surface fields on an individual brain like BIGBRAIN to a common template like FSAVG for group comparisons.

Transform metric map from BigBrain to fsavg (example: lh.curv)

cd $BBhome/BigBrain_to_fsavg/inmap_BigBrain_outmap_fsavg
mris_convert -c input/lh.BigBrain.curv $BBhome/white_surfaces/lh.BigBrain.white.surf.gii input/lh.BigBrain.curv.shape.gii
wb_command -metric-resample input/lh.BigBrain.curv.shape.gii $outmeshMSM $refmesh BARYCENTRIC output/lh.BigBrain.curv_rsled_to_fsavg.shape.gii
wb_command -set-structure output/lh.BigBrain.curv_rsled_to_fsavg.shape.gii CORTEX_LEFT