Creation of Average Surface Template

The tool average_surface_builder_mc.pl allows generating an average surface template for a specific population that is compatible with the CIVET surface-based registration tools. The steps are the following.

  1. Run CIVET with surfaces for the subjects in the study, using the default average surface template. Perform quality control and retain only the subjects that have passed the acceptance criterion.
  2. Generate the average white surface, first, without image gradient correction, then second with image gradient correction.
    • average_surface_builder_mc.pl -dir <base directory for CIVET results> -study <output directory for CIVET results relative to -dir> -outdir <output directory for average surface> -id-file <list.dat> -it 5 -sym -no-geom -numvertices 81920 -marching_cubes -white
    • draw a mask of the region of the surface where the intensity gradient correction must be applied. The mask takes the value 0 on the medial plane and brainstem and 1 everywhere else. Using this mask in the next invocation of ASB will activate the gradient correction.
    • average_surface_builder_mc.pl -dir <base directory for CIVET results> -study <output directory for CIVET results relative to -dir> -outdir <output directory for average surface> -id-file <list.dat> -it 10 -sym -no-geom -numvertices 81920 -marching_cubes -white -left-mask <left.txt> -right-mask <right.txt>
  3. Modify CIVET_Processing_Pipeline to specify your new average white surface model and mask in the hash table of %SURFACEmodels.
  4. Re-run CIVET with -reset-after surface_classify to regenerate the cortical surfaces using the new average white surface model.
  5. Generate the average mid-cortical surface.
    • average_surface_builder_mc.pl -dir <base directory for CIVET results> -study <output directory for CIVET results relative to -dir> -outdir <output directory for average surface> -id-file <list.dat> -it 10 -sym -no-geom -numvertices 81920 -marching_cubes -mid -base-model-path <output directory of average white surface>
  6. Modify CIVET_Processing_Pipeline to specify your new average mid-cortical surface model in the hash table of %SURFACEmodels.
  7. Surface parcellations defined on your new average surfaces can be added to the same hash table in the CIVET script.

Summary of options:

average_surface_builder_mc.pl -help

— Options ---------------------------------------------------------------------

  -dir <dir path>  Directory path?
  -study <study name>
                   Study name?
  -prefix <prefix> Prefix?
  -id-file <subjectlistfile>
                   Subject list file?
  -outdir <outdir> Output directory?
  -it <num>        Number of iterations?
  -sym             Symmetrical or asymmetrical? [default]
  -no-sym          opposite of -sym
  -geom            geom_surfreg or bestsurfreg? [default]
  -no-geom         opposite of -geom
  -non-linear      apply non-linear transform before averaging
  -no-non-linear   opposite of -non-linear [default]
  -numvertices <num>
                   Number of vertices (e.g., 81920). [default: 81920]
  -marching-cubes  Indicate that the white surface is for marching-cubes
                   [default ASP]
  -no-marching-cub opposite of -marching-cubes
  -left-mask <left_mask>
                   Left surface mask for marching-cubes
  -right-mask <right_mask>
                   Right surface mask for marching-cubes
  -white           white surface average [default mid]
  -mid             mid surface average
  -gray            gray surface average [default mid]

Notes:

  • Make sure to source the CIVET init.sh file prior to the start of the process.
  • The process is quite lengthy and will take a few weeks to complete, in particular the step with the intensity gradient correction. This is why it is suggested to start the process with 5 iterations without the gradient correction to stabilize the surface.
  • Do not use the -non-linear option on human brains since the morphology is too variable. This option is however better suited for macaque brains with lower sulcal variability.
  • Do not use the -geom option. It is mostly experimental.

Previous Section: Vertex-Based Statistical Analyses
Next Section: Source Code Access and Binaries

CIVET Home