RAS-coordinate lookup against a FreeSurfer volumetric parcellation (e.g. aparc+aseg.mgz / wmparc.mgz). More...
#include "fs_global.h"#include <Eigen/Core>#include <QString>#include <QStringList>#include <QMap>#include <QVector>

Go to the source code of this file.
Classes | |
| class | FSLIB::FsAtlasLookup |
| RAS-point → anatomical-region resolver backed by a FreeSurfer volumetric parcellation. More... | |
Namespaces | |
| namespace | FSLIB |
| FreeSurfer surface, annotation and parcellation I/O for mne-cpp. | |
RAS-coordinate lookup against a FreeSurfer volumetric parcellation (e.g. aparc+aseg.mgz / wmparc.mgz).
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
FreeSurfer’s recon-all writes the joint cortical+subcortical parcellation mri/aparc+aseg.mgz and the white-matter counterpart mri/wmparc.mgz: each voxel carries a single integer label whose meaning is fixed by $FREESURFER_HOME/FreeSurferColorLUT.txt (e.g. 17 = Left-Hippocampus, 1023 = ctx-lh-posteriorcingulate). The embedded MGH/MGZ vox2ras affine ties those voxel indices to scanner RAS millimetres.
This class loads such a volume, inverts the vox2ras matrix to obtain ras2vox, and exposes labelAtRas() / labelsForPositions() so any point in scanner RAS (typically dipole positions, electrode locations or sampled fibre tracks) can be tagged with the FreeSurfer region name it falls into. Out-of-bounds or unlabeled voxels resolve to "Unknown", matching mri_label2vol convention.
Definition in file fs_atlas_lookup.h.