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

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>
Include dependency graph for fs_atlas_lookup.h:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

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

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

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.