Surface-mesh label manipulation: grow, split into connected components, STC ↔ label conversion. More...
#include "fs_global.h"#include "fs_label.h"#include "fs_surface.h"#include <Eigen/Core>#include <Eigen/SparseCore>#include <QList>#include <QSet>

Go to the source code of this file.
Classes | |
| class | FSLIB::FsLabelUtils |
| Stateless utilities that grow, split and convert FsLabel objects on a FreeSurfer triangular surface. More... | |
Namespaces | |
| namespace | FSLIB |
| FreeSurfer surface, annotation and parcellation I/O for mne-cpp. | |
Surface-mesh label manipulation: grow, split into connected components, STC ↔ label conversion.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Algorithmic counterpart to FsLabel I/O. Operates on labels in the frame of an accompanying FsSurface, using the surface’s triangle connectivity as the vertex adjacency graph (one breadth-first hop per step in growLabel; connectivity-component flood-fill in splitLabel).
The stcToLabel / labelsToStc pair converts between source-time-course matrices indexed on a sparse subset of cortical vertices and the explicit vertex-list label form. This is the mne-cpp equivalent of mne.grow_labels, mne.split_label, mne.stc_to_label and mne.labels_to_stc in MNE-Python; the surface metric and indexing conventions are kept identical so round-tripping data between the two stacks does not require resampling.
Definition in file fs_label_utils.h.