@@ -85,17 +85,15 @@ def _pack_rgba(rgba):
85
85
"""Pack an RGBA sequence into a single integer.
86
86
87
87
Used by :func:`read_annot` and :func:`write_annot` to generate
88
- "annotation values" for a Freesuerfer `.annot` file.
88
+ "annotation values" for a Freesuerfer `` .annot` ` file.
89
89
90
90
Parameters
91
91
----------
92
-
93
92
rgba : ndarray, shape (n, 4)
94
93
RGBA colours
95
94
96
95
Returns
97
96
-------
98
-
99
97
out : ndarray, shape (n, 1)
100
98
Annotation values for each colour.
101
99
"""
@@ -326,16 +324,14 @@ def write_morph_data(file_like, values, fnum=0):
326
324
327
325
328
326
def read_annot (filepath , orig_ids = False ):
329
- """Read in a Freesurfer annotation from a `.annot` file.
327
+ """Read in a Freesurfer annotation from a `` .annot` ` file.
330
328
331
- An `.annot` file contains a sequence of vertices with a label (also known
329
+ An `` .annot` ` file contains a sequence of vertices with a label (also known
332
330
as an "annotation value") associated with each vertex, and then a sequence
333
331
of colours corresponding to each label.
334
332
335
- The colour table itself may be stored in either an "old-style" format, or
336
- a "new-style" format - the :func:`_read_annot_ctab_old_format` and
337
- :func:`_read_annot_ctab_new_format` functions are respectively used to
338
- read in the colour table.
333
+ Annotation file format versions 1 and 2 are supported, corresponding to
334
+ the "old-style" and "new-style" color table layout.
339
335
340
336
See:
341
337
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation
@@ -488,7 +484,7 @@ def _read_annot_ctab_new_format(fobj, ctab_version):
488
484
489
485
490
486
def write_annot (filepath , labels , ctab , names , fill_ctab = True ):
491
- """Write out a Freesurfer annotation file.
487
+ """Write out a "new-style" Freesurfer annotation file.
492
488
493
489
See:
494
490
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation
0 commit comments