Creates average subject by averaging surfaces, curvatures, and volumes from a set of subjects. The surface is a 7th order icosahedron tesselation. For surfaces, the XYZ coordinate of a vertex is computed as the average talairach coordinate of that vertex in each subject. The talairach coordinate is based on talairach.xfm (unless changed with --xform), so the individual talairachs must be accurate for the final coordinate to be meaningful. Note that even though talairach coordinates are used for surfaces, all surface-based averaging is done using the surface atlas (NOT talairach averaging!).

Calls make_average_surface and make_average_volume. See these programs for specific help.

The subject list can be specified in one of three ways:

  1. on the command-line with --subjects
  2. through the SUBJECTS environment variable
  3. specifying a FreeSurfer Group Descriptor (FSGD) file. The FSGD is used by freesurfer to specify designs for statistical analysis. See

The output will be created in SUBJECTS_DIR/averagesubjectname unless --topdir is specified. In this case, the data are stored in topdir/averagesubjectname, and a link is created to SUBJECTS_DIR/averagesubjectname. This can convenient when your the disk that hosts your SUBJECTS_DIR starts to get full.


make_average_subject --subjects <subjects> --fsgd fsgdfile [options]


Required Flagged Arguments

--subjects <subj1> <subj2> ...

Also can declare subjects in SUBJECTS env variable

--fsgd fsgdfile

Get subject list from fsgd

Optional Flagged Arguments

--out <average subject name>

Default name is 'average'

--sd-out sdout

Put output under sdout instead of SUBJECTS_DIR


Link back to the original SUBJECTS_DIR with --sd-out

--sdir <SUBJECTS_DIR to use instead of the one in the env>


Same as --sdir

--xform <transform_fname>

Filename of transform file


Do not make average surfaces


Do not make average volumes


Overwrite existing average subject data


Short descriptive help


Script version info


Enable command echo, for debugging


Same as --echo


Example 1

make_average_subject --out avgsubject --subjects subj1 subj2 subj3 subj4

Will create $SUBJECTS_DIR/avgsubject with average surfaces for orig, white, pial, inflated for each hemi. It will also create average volumes for orig, brain, and T1. Notice that the '--out avgsubject' is merely overriding the default output name 'average'.

Example 2

  setenv SUBJECTS = (subj1 subj2 subj3 subj4)
  make_average_subject --out avgsubject 

Will do the same as Example 1

Example 3

tkregister2 --fstal --s avgsubject --mgz

Checks that the average subject volume aligns with the talairach subject:

Example 4

tkmedit avgsubject orig.mgz lh.white

Check that the average subject surfaces align with the volume. You should see that the surfaces more-or-less align with the folds. Remember this is talairach, so the volume will be blurry.

See Also

make_average_volume, make_average_surface, recon-all, make_final_surfaces, morph_subject

Reporting Bugs

Report bugs to

make_average_subject (last edited 2017-12-19 10:19:48 by MorganFogarty)