Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
== Reading Into Matlab ==
[v, L, ct] = read_annotation(annotation_filename);
Line 4: Line 6:
Suppose N is the number of vertices. Then,

v = N x 1 vector, v(i) = i-1 (you can usually ignore v)
L = N x 1 vector, L(i) = label of ith vertex of mesh
ct = colortable structure

=== What is a colortable? ===
The colortable matches the label with the structure name. It also gives color to each structure type. In matlab, the colortable structure can be dissected as follows.

ct.numEntries = # structures that are specified (scalar)

ct.orig_tab = where original colortable was found (string). It's mainly for book-keeping

ct.struct_names = list of structure names (cell). The number of strings should be equal to the number of entries. For example, ct.struct_names{1} could be 'central sulcus'

ct.table = ct.numEntries x 5 matrix

An annotation file contains labels of a surface, for example the sulci and gyri labels of a cortical surface.

Reading Into Matlab

[v, L, ct] = read_annotation(annotation_filename);

Suppose N is the number of vertices. Then,

v = N x 1 vector, v(i) = i-1 (you can usually ignore v) L = N x 1 vector, L(i) = label of ith vertex of mesh ct = colortable structure

What is a colortable?

The colortable matches the label with the structure name. It also gives color to each structure type. In matlab, the colortable structure can be dissected as follows.

ct.numEntries = # structures that are specified (scalar)

ct.orig_tab = where original colortable was found (string). It's mainly for book-keeping

ct.struct_names = list of structure names (cell). The number of strings should be equal to the number of entries. For example, ct.struct_names{1} could be 'central sulcus'

ct.table = ct.numEntries x 5 matrix

AnnotFiles (last edited 2008-04-29 11:45:15 by localhost)