This repository provides all scripts required for aligning surfaces (derived from the dHCP structural pipeline) to the dHCP surface template space
This needs to be done in three steps:
- Estimation and application of a rotational transform between MNI space and HCP FS_LR space
- Estimation of a non-linear transform between each surface's native space and template space using MSM
- Resampling of native surfaces into template surface topology (the FS_LR32k space)
For the first step the rotational transformation between MNI space and HCP FS_LR space is given in the folder rotational_transforms. The scripts used to do this can be found (for reference) in the pre_rotation folder
Therefore, to run alignment to template, all that is required is to run the surface_to_template_alignment/align_to_template.sh script. This applies the rotation rotational_transforms/week40_toFS_LR_rot.L.txt (or rotational_transforms/week40_toFS_LR_rot.R.txt ) to the surfaces; then aligns non-linearly using MSM [1][2], before finally resampling all Native surfaces and data onto the template surface topology (creating a new data folder fsaverage_LR32k in the process)
Note for non HCP data you may find the following script more stable surface_to_template_alignment/align_to_template_no_volumetric_initialisation.sh (inputs stay the same)