Index TableOfContents

Note: As of 2008-01-19, it looks to me like parts of this file were left-overs from the page of some unrelated command. I have moved these sections to the bottom "Obsolete?" section. Someone official can perhaps clean this up. -- GW

Name

mri_annotation2label - Converts annotation into label files

Synopsis

mri_annotation2label [Flagged arguments]

Arguments

Flagged Arguments

Category

Flag

<Args>

Reqd

Description

Input

--a2005s

n

Use 'aparc.a2005s' as the annotation base name, (Default: use 'aparc')

Input

--annotation

<annotation>

Y

Selects input annotation file, as found in SUBJDIR/labels. Default is 'aparc'.

Input

--hemi

<hemi>

Y

lh or rh. Used in conjunctions with surface name to compose surface file name. [Might be used with annotation name too? Not sure -- GW]

Input

--subject

<subject>

Y

source subject

Input

--surface or --surf

<surfacename>

n

Name of surface. Default if omitted: 'white'. This selects the surface file that the program will read in order to create R,A,S coordinates for each vertex listed in a label file.

Input

--table

n

ERROR: Older versions of program worked in conjunction with separate colortable. Current versions expect to read colortable from annotation file.

Output

--border

<borderfile>

n

Creates an overlay file in which the boundaries of the parcellations are set to 1 and everything else is 0. This can then be loaded as an overlay in tksurfer.

Output

--labelbase

<labelbase>

n

If supplied, the program will compose output label filenames using the pattern 'labelbase-XXX.label' (where XXX is label number). (Default: compose label filenames based on label names found in annotation file.)

Output

--outdir

<outdir>

?

Directory in which to place output label files. Complete path will be: 'outdir/hemi.name.label' (with 'name' composed according to other rules). Required unless specifying one of the other kinds of output.

Output

--seg

<segfile>

n

This option causes program to output a 'volume-encoded surface segmentation file'. This is simply the list of per-vertex label values (count = count of vertices), dumped into a file whose format looks like an FS volume file... which some other FS programs are equipped to load. (Ie: it is not actually volume data). See details below.

Output

--segbase

<segbase (int)>

n

Add segbase to each label value when outputting to a segfile.

Utility

--debug

n

enable debugging options

Utility

--help

n

display help

Utility

--version

n

display version

XXXXXXXXXXXXX

-

Description

This program will convert an annotation file into multiple label files. Inputs are specified via subject, hemisphere, and optionally, if defaults are not wanted, a base name for the annotation, and a specific surface to be used for the R,A,S coordinates to be placed in the label files.

the lookup table in the annotation file.

Probably applies to obsolete version

The human-readable names that correspond to the annotation indices for aparc depend upon how the annotations were created. They are created with the program mris_ca_label, and the human readable names are in the file given as the argument to the -t flag. Unfortunately, this information is not maintained inside the annotation file, and it must be supplied to mri_annotation2label through the --table flag.

Examples

Example 1

mri_annotation2label --subject LW \
  --hemi rh \
  --labelbase ./labels/aparc-rh

This will get annotations from $SUBJECTS_DIR/LW/label/rh_aparc.annot and then create about 94 label files: aparc-rh-001.label, aparc-rh-002.label, ... Note that the directory 'labels' must already exist.

Example 2

mri_annotation2label --subject LW \
  --hemi rh
  --outdir ./labels

This will do the same thing as above except that the output files will have names of the form lh.S_occipital_anterior.label

Bugs

If the name of the label base does not include a forward slash (ie, '/') then the program will attempt to put the label files in $SUBJECTS_DIR/subject/label. So, if you want the labels to go into the current directory, make sure to put a './' in front of the label base.

Testing

  1. Start tksurfer:
    • tksurfer -LW lh inflated read_annotations lh_aparc
    • When a point is clicked on, it prints out a lot of info, including something like:
      • annot = S_temporalis_sup (93, 3988701) (221, 220, 60)
      This indicates that annotion number 93 was hit. Save this point.
  2. Start another tksurfer and load the label:
    • tksurfer -LW lh inflated [edit label field and hit the 'Read' button]
    • Verify that label pattern looks like the annotation as seen in the tksurfer window from step 1.
  3. Load label into tkmedit
    • tkmedit LW T1 [Load the label]
    • [Goto the point saved from step 1]

See Also

Obsolete?

Positional Arguments

Required Flagged Arguments

--srcreg

srcreg.dat

--targreg

targreg.dat

Optional Flagged Arguments

--targsubj subjid

default is talairach

--xfm xfmrname

xfm file name relative to transforms

--sd subjects_dir

default is env SUBJECTS_DIR

--fvol funcvol

path to example functional volume

--help

--version

Positional Arguments

Required Flagged Arguments

--srcreg

srcreg.dat

--targreg

targreg.dat

Optional Flagged Arguments

--targsubj subjid

default is talairach

--xfm xfmrname

xfm file name relative to transforms

--sd subjects_dir

default is env SUBJECTS_DIR

--fvol funcvol

path to example functional volume

--help

--version

Links

FreeSurfer, FsFast

Reporting Bugs

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