v2.0.0
Loading...
Searching...
No Matches
fs_label_utils.h
Go to the documentation of this file.
1//=============================================================================================================
26
27#ifndef FS_LABEL_UTILS_H
28#define FS_LABEL_UTILS_H
29
30//=============================================================================================================
31// INCLUDES
32//=============================================================================================================
33
34#include "fs_global.h"
35#include "fs_label.h"
36#include "fs_surface.h"
37
38//=============================================================================================================
39// EIGEN INCLUDES
40//=============================================================================================================
41
42#include <Eigen/Core>
43#include <Eigen/SparseCore>
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QList>
50#include <QSet>
51
52//=============================================================================================================
53// DEFINE NAMESPACE FSLIB
54//=============================================================================================================
55
56namespace FSLIB
57{
58
59//=============================================================================================================
69{
70public:
71 //=========================================================================================================
84 static FsLabel growLabel(const FsLabel& label,
85 const FsSurface& surface,
86 int nSteps);
87
88 //=========================================================================================================
99 static QList<FsLabel> splitLabel(const FsLabel& label,
100 const FsSurface& surface);
101
102 //=========================================================================================================
117 static QList<FsLabel> stcToLabel(const Eigen::MatrixXd& stcData,
118 const Eigen::VectorXi& vertices,
119 const FsSurface& surface,
120 double dThreshold = 0.0,
121 int iHemi = 0);
122
123 //=========================================================================================================
135 static Eigen::MatrixXd labelsToStc(const QList<FsLabel>& labels,
136 const Eigen::VectorXi& stcVertices,
137 int nTimes);
138
139 //=========================================================================================================
148 static QList<QSet<int>> buildAdjacency(const Eigen::MatrixX3i& tris,
149 int nVerts);
150};
151
152} // namespace FSLIB
153
154#endif // FS_LABEL_UTILS_H
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.
#define FSSHARED_EXPORT
Definition fs_global.h:38
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...
Definition fs_label.h:79
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.
Definition fs_surface.h:92