Index TableOfContents
Name
mri_annotation2label - Converts annotation into label files
Synopsis
Arguments
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 |
Description
This program will convert an annotation into multiple label files. User specifies the subject, hemisphere, label base, and (optionally) the annotation base and surface. By default, the annotation base is aparc. The program will retrieves the annotations from SUBJECTS_DIR/subject/label/hemi_annotbase.annot. A separate label file is created for each annotation index. The output file names can take one of two forms: (1) If --outdir dir is used, then the output will be dir/hemi.name.lable, where name is the corresponding name in the table. (2) If --labelbase is used, name of the file conforms to labelbase-XXX.label, where XXX is the zero-padded 3 digit annotation index. If labelbase includes a directory path, that directory must already exist. If there are no points in the annotation file for a particular index, no label file is created. The xyz coordinates in the label file are obtained from the values at that vertex of the specified surface. The default surface is 'white'. Other options include 'pial' and 'orig'. BR
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
- 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)
- 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.
- Load label into tkmedit
- tkmedit LW T1 [Load the label]
- [Goto the point saved from step 1]
See Also
Links
Reporting Bugs
Report bugs to <analysis-bugs@nmr.mgh.harvard.edu>