v2.0.0
Loading...
Searching...
No Matches
fs_colortable.h File Reference

In-memory representation of a FreeSurfer colour/structure lookup table (FreeSurferColorLUT / embedded .annot ctab). More...

#include "fs_global.h"
#include <QString>
#include <QStringList>
#include <QSharedPointer>
#include <Eigen/Core>
Include dependency graph for fs_colortable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FSLIB::FsColortable
 FreeSurfer colour lookup table: region name + RGBA + packed label, indexed by entry. More...

Namespaces

namespace  FSLIB
 FreeSurfer surface, annotation and parcellation I/O for mne-cpp.

Detailed Description

In-memory representation of a FreeSurfer colour/structure lookup table (FreeSurferColorLUT / embedded .annot ctab).

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

FreeSurfer ships a global colour lookup table at $FREESURFER_HOME/FreeSurferColorLUT.txt that maps integer labels (cortical parcels, subcortical structures, white-matter parcels, …) to a human-readable name and an RGBA tuple used by tkmedit, freeview and downstream tooling. The same table is also embedded directly inside .annot files via the TAG_OLD_COLORTABLE and TAG_NEW_COLORTABLE blocks parsed by FsAnnotation.

This class is the binary-friendly in-memory form of either source:

  • struct_names — region name per entry, indexed by row
  • table  — numEntries × 5 matrix of [R, G, B, A, packed_label] where packed_label is the same R + (G ≪ 8) + (B ≪ 16) + (A ≪ 24) integer used to encode per-vertex assignments in .annot files
  • orig_tab  — atlas/table provenance string (e.g. "aparc.annot.ctab") preserved from the source

Definition in file fs_colortable.h.