Differences between revisions 2 and 26 (spanning 24 versions)
Revision 2 as of 2004-08-27 15:08:18
Size: 1147
Editor: DavidTuch
Comment:
Revision 26 as of 2011-10-19 15:33:06
Size: 5563
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Note: This page was created with the CommandTemplate
##
## If you're modifying this page please take a look at the
## latest version of CommandTemplate to ensure that you're
## using the latest version of the CommandTemplate
##
## See HelpOnCommandTemplate for description of formatting

[[Navigation(children)]]
<<Navigation(children)>>
Line 11: Line 3:
[[TableOfContents]]
<<TableOfContents>>
Line 15: Line 6:

mris_ca_train - ??
'''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.
Line 19: Line 9:
mris_ca_train hemi canonsurf annotfile subject1 [subject2 ...] [outputfile] mris_ca_train [options] <hemi> <canonsurf> <annotfile> <subject1> [subject2 ...] <outputfile>
Line 24: Line 14:
|| hemi || hemisphere || ||
|| canon surf || canonical surface || ||
|| annot file || annotation file || ||
|| subject 1 [subject 2...] || subject(s)|| ||
|| outputfile || output file ||
|| [options] || -sdir, -nbrs, -orig, -norm1, -norm2, -norm3, -ic, -sulc, -sulconly, -a, -t, -v, -n, --help, --version ||
|| <hemi> || hemisphere: rh or lh ||
|| <canonsurf> || Name of canonical surface file to input from every subject, usually lh.sphere.reg or rh.sphere.reg ||
|| <annotfile> || Name of per-subject annotation file to input from every subject, eg: lh.my_manual_labeling.annot||
|| <subject1> [subject 2...] || subject(s) ||
|| <outputfile> || classifier array output file, eg: ./lh.my_atlas.gcs ||
Line 30: Line 21:
== Required Flagged Arguments ==
none
== Required Positional Arguments ==
hemi canonsurf annotfile subject1 outputfile
Line 34: Line 25:
none || -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) ||
|| -norm1 || GCSA normalize input #1 after reading (default: disabled) ||
|| -norm2 || GCSA normalize input #2 after reading (default: disabled) ||
|| -norm3 || GCSA normalize input #3 after reading (default: disabled) ||
|| -ic <number_priors> <number_classifiers> || parameters passed to the classifier routine (default: -ic 7 4) ||
|| -sulc || specify sulc as only input (default: sulcus and curvature) ||
|| -sulconly || 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) ||
|| --help || print help info ||
|| --version || print version info ||
Line 37: Line 43:
||outpufile|| || || <outputfile> || classifier array output file, containing probabilistic information estimated from the manually labeled training set ||
Line 39: Line 45:
= Description =
??
= Example =
{{{
mris_ca_train -n 2 \
    -t ./my_color_file.txt \
    lh \
    sphere.reg \
    my_manual_labeling \
    $SUBJECTS \
    ./lh.my_atlas.gcs
}}}
Line 42: Line 56:
= Examples =
== Example 1 ==
??
== Example 2 ==
??
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 assumes that a canonical surface file named '''lh.sphere.reg''' exists in the surf dir of each subject.

An annotation file is created in tksurfer. See wiki pages [[tksurfer_labeledit]] or [[TkSurferGuide/TkSurferWorkingWithData/TkSurferLabel|TkSurferLabel]]. '''File->Label->Export Annotation''' is what exports all labels that have been assigned to a structure into the .annot file. To make assignments, open the 'Labels' window, via '''View->Windows->Labels''', and assign each label to a structure and it's associated color. If you want to modify the set of available structures (and their colors), then you should create a new file in the same format as $FREESURFER_HOME/FreeSurferColorLUT.txt and select '''File->Lable->Load Color Table'''.

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:
{{{
  0 unknown 1 1 1 0
  1 oasis.chubs.ifc 25 100 40 0
}}}
The first line is a 'default' label, that must be named 'unknown', that must be included in the colortable when creating a .annot file when mris_label2annot was run. It will be the label for any vertex not labelled by one of the other labels. The second line in this colortable is an example of a valid label. The numbers are RGBA (red, green, blue, alphas) codes, where alpha is not used. Note that 'unknown' must have a non-zero color (ie cannot be 0 0 0 0).
Line 52: Line 75:
[[mris_sample_parc]], [[mris_ca_label]], SurfaceRegAndTemplates
Line 54: Line 78:
FreeSurfer, FsFast

= Methods Description =
CorticalParcellation, FreeSurfer, FsFast
Line 59: Line 81:
[[https://surfer.nmr.mgh.harvard.edu/ftp/articles/fischl04-parcellation.pdf|Automatically Parcellating the Human Cerebral Cortex]], Fischl et al., (2004). Cerebral Cortex, 14:11-22.

Index

Name

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.

Synopsis

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

Arguments

Positional Arguments

[options]

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

<hemi>

hemisphere: rh or lh

<canonsurf>

Name of canonical surface file to input from every subject, usually lh.sphere.reg or rh.sphere.reg

<annotfile>

Name of per-subject annotation file to input from every subject, eg: lh.my_manual_labeling.annot

<subject1> [subject 2...]

subject(s)

<outputfile>

classifier array output file, eg: ./lh.my_atlas.gcs

Required Positional 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)

-norm1

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

-norm2

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

-norm3

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

-ic <number_priors> <number_classifiers>

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

-sulc

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

-sulconly

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)

--help

print help info

--version

print version info

Outputs

<outputfile>

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

Example

mris_ca_train -n 2 \
    -t ./my_color_file.txt \
    lh \
    sphere.reg \
    my_manual_labeling \
    $SUBJECTS \
    ./lh.my_atlas.gcs

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 assumes that a canonical surface file named lh.sphere.reg exists in the surf dir of each subject.

An annotation file is created in tksurfer. See wiki pages tksurfer_labeledit or TkSurferLabel. File->Label->Export Annotation is what exports all labels that have been assigned to a structure into the .annot file. To make assignments, open the 'Labels' window, via View->Windows->Labels, and assign each label to a structure and it's associated color. If you want to modify the set of available structures (and their colors), then you should create a new file in the same format as $FREESURFER_HOME/FreeSurferColorLUT.txt and select File->Lable->Load Color Table.

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:

  0  unknown                         1   1   1   0
  1  oasis.chubs.ifc                25 100  40   0

The first line is a 'default' label, that must be named 'unknown', that must be included in the colortable when creating a .annot file when mris_label2annot was run. It will be the label for any vertex not labelled by one of the other labels. The second line in this colortable is an example of a valid label. The numbers are RGBA (red, green, blue, alphas) codes, where alpha is not used. Note that 'unknown' must have a non-zero color (ie cannot be 0 0 0 0).

Bugs

None

See Also

mris_sample_parc, mris_ca_label, SurfaceRegAndTemplates

Links

CorticalParcellation, FreeSurfer, FsFast

References

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

Reporting Bugs

Report bugs to <analysis-bugs@nmr.mgh.harvard.edu>

Author/s

BruceFischl

mris_ca_train (last edited 2011-10-19 15:33:06 by NickSchmansky)