Navigation(children) Index TableOfContents


mris_ca_train - Creates a cortical parcellation atlas file based on one or more annotated subjects. mris_ca_train builds probabilistic information estimated from a manually labeled training set (of annotated subjects). Note that an "annotation" is synonymous with a "parcellation", and is used for backwards compatibility. The manual labeling can be carried out directly on surface models using drawing tools in tksurfer, or volumetrically, then sampled onto the surfaces using ["mris_sample_parc"]. This information is then used by ["mris_ca_label"] to automatically assign a neuroanatomical label to each location on a cortical surface model. This procedure incorporates both geometric information derived from the cortical model (sulcus and curvature), and neuroanatomical convention, as found in the training set. The result of mris_ca_train and mris_ca_label is a complete labeling of cortical sulci and gyri.


mris_ca_train [options] <hemi> <canonsurf> <annotfile> <subject1> [subject2 ...] <outputfile>


Positional Arguments


-sdir, -nbrs, -orig, -norm1, -norm2, -norm3, -ic, -sulc, -sulconly, -a, -t, -v, -n, -?, -u, --help, --version


hemisphere: rh or lh


canonical surface file


annotation file

<subject1> [subject 2...]



classifier array output file

Required Flagged Arguments

hemi canonsurf annotfile subject1 outputfile

Optional Flagged Arguments

-sdir <subject dir>

specify a subjects directory (default=$SUBJECTS_DIR)

-nbrs <number>

neighborhood size (default=2)

-orig <filename>

specify filename of original surface (default=smoothwm)


GCSA normalize input #1 after reading (default: disabled)


GCSA normalize input #2 after reading (default: disabled)


GCSA normalize input #3 after reading (default: disabled)

-ic <number_priors> <number_classifiers>

parameters passed to the classifier routine (default: -ic 7 4)


specify sulc as only input (default: sulcus and curvature)


same as -sulc

-a <number>

number of averages (default=5)

-t <filename>

specify parcellation table input file (default: none)

-v <number>

diagnostic level (default=0)

-n <number>

number of inputs (default=1)


print usage info


same as -?


print help info


print version info



classifier array output file, containing probabilistic information estimated from the manually labeled training set


mris_ca_train -n 2 \
    -t ./my_color_file.txt \
    lh \
    sphere.reg \
    my_manual_labeling \

In this example, mris_ca_train would look for an annotation file named lh.my_manual_labeling.annot in each of the subjects listed in $SUBJECTS label dir (e.g. $SUBJECTS_DIR/$s/label), and also assume that a canonical surface file named lh.sphere.reg existed in the surf dir of each subject.

The -n 2 option tells it to use two feature dimensions for classification: curv and sulc (which is what is used by default).

The -t ./my_color_file.txt option will read in the file my_color_file.txt and embed it in the atlas, so that mris_ca_label will put it in the automatically generated .annot files, so that later, tksurfer (and other things) can read it in.

The format of the my_color_file.txt file consists of a set of lines like:

1   Corpus_callosum     50      50      50      0

where the last value (0, in this example) is not used, and the 50s are r,g,b (red,green,blue) values. They must match what is in the annot file, in which each vertex is given the value: r+(g << 8)+(b << 16).



See Also

["mris_sample_parc"], ["mris_ca_label"]


CorticalParcellation, FreeSurfer, FsFast


[ Automatically Parcellating the Human Cerebral Cortex], Fischl et al., (2004). Cerebral Cortex, 14:11-22.

Reporting Bugs

Report bugs to <>