We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7af65ce commit 66a9f2dCopy full SHA for 66a9f2d
nibabel/freesurfer/io.py
@@ -383,11 +383,11 @@ def read_annot(filepath, orig_ids=False):
383
name = np.fromfile(fobj, "|S%d" % name_length, 1)[0]
384
names.append(name)
385
# RGBA
386
- ctab[i, :4] = np.fromfile(fobj, dt, 4)
387
- ctab[i, 4] = (ctab[i, 0] +
388
- ctab[i, 1] * (2 ** 8) +
389
- ctab[i, 2] * (2 ** 16) +
390
- ctab[i, 3] * (2 ** 24))
+ ctab[idx, :4] = np.fromfile(fobj, dt, 4)
+ ctab[idx, 4] = (ctab[idx, 0] +
+ ctab[idx, 1] * (2 ** 8) +
+ ctab[idx, 2] * (2 ** 16) +
+ ctab[idx, 3] * (2 ** 24))
391
392
# make sure names are strings, not bytes
393
names = [n.decode('ascii') for n in names]
0 commit comments