Skip to content

Surface Extraction

In the surface extraction step, a segmented volume is processed to build a 3D surface of the white matter surface of the brain. This is the last step of fetpype.

Segmentation

Available tools

Several state-of-the-art segmentation algorithms have been wrapped and tested in fetpype.

Algorithm Repository Docker
Fetpype surface extraction (surf_pype) https://github.com/fetpype/surface_processing https://hub.docker.com/r/fetpype/surf_proc
dHCP1 https://github.com/fetpype/dhcp-structural-pipeline https://hub.docker.com/r/gerardmartijuan/dhcp-pipeline-multifact

⚠️ Disclaimer: The dHCP pipeline is only available in the dev branch as of now. Surface extraction using the dHCP structural pipeline1 can be obtained with the flags -surf and -all.

Config structure

Here's a typical structure found in the BOUNTI config.

pipeline: "surf_pype"
docker: 
  cmd: "docker run --rm <mount>
    fetpype/surf_proc:v0.0.2
    generate_mesh -l <labelling_scheme> 
    -s <input_seg> 
    -m <output_surf>"
singularity:
  cmd: "singularity exec --bind <singularity_mount> --home <singularity_home> --nv
    <singularity_path>/macatools/surf_proc.sif
    fetpype/surf_proc:v0.0.2
    generate_mesh -l <labelling_scheme> 
    -s <input_seg> 
    -m <output_surf>"

surface_lh:
    use_scheme: "bounti"
    out_file: "hemi-L_white.surf.gii"
    labelling_scheme:
        bounti: [5, 7, 14, 16]

surface_rh:
    use_scheme: "bounti"
    out_file: "hemi-R_white.surf.gii"
    labelling_scheme:
        bounti: [6, 8, 15, 17]

Note

The surface is computed on each hemisphere separately (surface_lh and surface_rh). The surface extraction groups together labels in the white matter. For the left hemisphere and BOUNTI labels, it groups the left white matter (5), the left lateral ventricle (7), the left basal ganglia (14) as well as the left thalamus (16). Information on the BOUNTI labelling scheme are available here.

Note

All the container runs use the command above and are passed through the function run_surf_cmd

Tags

There are a limited set of tags that can be used for reconstruction:

Command
Description Comments
<mount> Where the different folders will be mounted on Docker Docker only
<singularity_mount> Where the different folders will be mounted on Singularity Singularity only
<singularity_path> The base path of the Singularity image Singularity only
<singularity_home> A directory used for temporary files Singularity only
<input_seg> The input segmentation to be used for surface extraction
<labelling_scheme> List of labels in the to concatenate in order to get the white matter mask of the given hemisphere
<output_surf> The output extracted surface

Available tools

Surface extraction in Fetpype is currenly available using the dHCP structural pipeline1, with the flags -surf and -all.

Note: Surface extraction requires prior reconstruction and gestational age information. Refer to the dHCP configuration and requirements for more details.


  1. Antonios Makropoulos, Emma C Robinson, Andreas Schuh, Robert Wright, Sean Fitzgibbon, Jelena Bozek, Serena J Counsell, Johannes Steinweg, Katy Vecchiato, Jonathan Passerat-Palmbach, and others. The developing human connectome project: a minimal processing pipeline for neonatal cortical surface reconstruction. Neuroimage, 173:88–112, 2018.