27#ifndef FS_LABEL_UTILS_H
28#define FS_LABEL_UTILS_H
43#include <Eigen/SparseCore>
117 static QList<FsLabel>
stcToLabel(
const Eigen::MatrixXd& stcData,
118 const Eigen::VectorXi& vertices,
120 double dThreshold = 0.0,
135 static Eigen::MatrixXd
labelsToStc(
const QList<FsLabel>& labels,
136 const Eigen::VectorXi& stcVertices,
148 static QList<QSet<int>>
buildAdjacency(
const Eigen::MatrixX3i& tris,
Reader and in-memory representation of a single FreeSurfer triangular surface (e.g....
Export/import macros and build-info accessors for the FSLIB FreeSurfer I/O library.
Reader and in-memory representation of a FreeSurfer/MNE surface label (.label).
FreeSurfer surface, annotation and parcellation I/O for mne-cpp.
A FreeSurfer/MNE surface label: per-vertex indices, Tk-RAS positions and scalar values for one hemisp...
Stateless utilities that grow, split and convert FsLabel objects on a FreeSurfer triangular surface.
static QList< QSet< int > > buildAdjacency(const Eigen::MatrixX3i &tris, int nVerts)
Build adjacency list from surface triangle mesh.
static QList< FsLabel > splitLabel(const FsLabel &label, const FsSurface &surface)
Split a label into connected components.
static FsLabel growLabel(const FsLabel &label, const FsSurface &surface, int nSteps)
Grow a label by expanding along the surface mesh.
static Eigen::MatrixXd labelsToStc(const QList< FsLabel > &labels, const Eigen::VectorXi &stcVertices, int nTimes)
Convert labels to a binary source estimate mask.
static QList< FsLabel > stcToLabel(const Eigen::MatrixXd &stcData, const Eigen::VectorXi &vertices, const FsSurface &surface, double dThreshold=0.0, int iHemi=0)
Convert a source estimate to labels by thresholding.
In-memory FreeSurfer triangular cortical surface for one hemisphere.