v2.0.0
Loading...
Searching...
No Matches
surface_laplacian.h
Go to the documentation of this file.
1//=============================================================================================================
26
27#ifndef SURFACE_LAPLACIAN_H
28#define SURFACE_LAPLACIAN_H
29
30//=============================================================================================================
31// INCLUDES
32//=============================================================================================================
33
34#include "dsp_global.h"
35
36//=============================================================================================================
37// EIGEN INCLUDES
38//=============================================================================================================
39
40#include <Eigen/Core>
41
42//=============================================================================================================
43// DEFINE NAMESPACE UTILSLIB
44//=============================================================================================================
45
46namespace UTILSLIB
47{
48
49//=============================================================================================================
54{
55 Eigen::MatrixXd matData;
56 Eigen::MatrixXd matTransform;
57};
58
59//=============================================================================================================
77{
78public:
79 //=========================================================================================================
91 static SurfaceLaplacianResult compute(const Eigen::MatrixXd& matData,
92 const Eigen::MatrixX3d& matPositions,
93 double dLambda2 = 1e-5,
94 int iStiffness = 4,
95 int iNLegendreTerms = 50,
96 double dSphereRadius = -1.0);
97
98 //=========================================================================================================
109 static Eigen::MatrixXd computeTransform(const Eigen::MatrixX3d& matPositions,
110 double dLambda2 = 1e-5,
111 int iStiffness = 4,
112 int iNLegendreTerms = 50,
113 double dSphereRadius = -1.0);
114
115private:
119 static Eigen::MatrixXd computeG(const Eigen::MatrixXd& matCosAng,
120 int iStiffness,
121 int iNLegendreTerms);
122
126 static Eigen::MatrixXd computeH(const Eigen::MatrixXd& matCosAng,
127 int iStiffness,
128 int iNLegendreTerms);
129
133 static Eigen::MatrixXd evaluateLegendre(const Eigen::MatrixXd& matX, int iMaxOrder);
134};
135
136} // namespace UTILSLIB
137
138#endif // SURFACE_LAPLACIAN_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Result of a surface Laplacian (CSD) computation.
Eigen::MatrixXd matData
Transformed data (n_eeg_channels × n_times).
Eigen::MatrixXd matTransform
CSD transformation matrix (n_eeg × n_eeg).
Surface Laplacian / Current Source Density (CSD) transformation.
static SurfaceLaplacianResult compute(const Eigen::MatrixXd &matData, const Eigen::MatrixX3d &matPositions, double dLambda2=1e-5, int iStiffness=4, int iNLegendreTerms=50, double dSphereRadius=-1.0)
static Eigen::MatrixXd computeTransform(const Eigen::MatrixX3d &matPositions, double dLambda2=1e-5, int iStiffness=4, int iNLegendreTerms=50, double dSphereRadius=-1.0)