FsAtlasLookup
Namespace: FSLIB · Library: FreeSurfer Library
#include <fs/fs_atlas_lookup.h>
class FSLIB::FsAtlasLookup
RAS-point → anatomical-region resolver backed by a FreeSurfer volumetric parcellation.
Owns the parcellation voxel grid, its inverse RAS-to-voxel affine, and a label-id → region-name map seeded from FreeSurferColorLUT. Designed for cheap per-point queries: a labelAtRas() call is an affine transform, three bound checks and an int → QString hash lookup.
Public Methods
FsAtlasLookup()
Constructs an empty atlas lookup.
load(sParcellationPath)
Load a FreeSurfer MGH/MGZ volume parcellation.
Parameters:
- sParcellationPath : const QString & Path to the volume file (e.g. aparc+aseg.mgz).
Returns:
- bool — true if loaded successfully.
labelAtRas(ras)
Look up the anatomical label at a RAS coordinate.
Parameters:
- ras : const Eigen::Vector3f & 3D position in RAS space (in mm).
Returns:
- QString — Label string, or "Unknown" if out of bounds or unlabeled.
labelsForPositions(positions)
Look up labels for multiple RAS positions.
Parameters:
- positions : const QVector< Eigen::Vector3f > & List of 3D RAS positions.
Returns:
- QStringList — List of label strings (one per position).
isLoaded()
Check whether a parcellation volume has been loaded.
Returns:
- bool — true if loaded.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>