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//=============================================================================================================
56{
57 Eigen::MatrixXd matData;
58 Eigen::MatrixXd matTransform;
59};
60
61//=============================================================================================================
73{
74public:
75 //=========================================================================================================
87 static SurfaceLaplacianResult compute(const Eigen::MatrixXd& matData,
88 const Eigen::MatrixX3d& matPositions,
89 double dLambda2 = 1e-5,
90 int iStiffness = 4,
91 int iNLegendreTerms = 50,
92 double dSphereRadius = -1.0);
93
94 //=========================================================================================================
105 static Eigen::MatrixXd computeTransform(const Eigen::MatrixX3d& matPositions,
106 double dLambda2 = 1e-5,
107 int iStiffness = 4,
108 int iNLegendreTerms = 50,
109 double dSphereRadius = -1.0);
110
111private:
115 static Eigen::MatrixXd computeG(const Eigen::MatrixXd& matCosAng,
116 int iStiffness,
117 int iNLegendreTerms);
118
122 static Eigen::MatrixXd computeH(const Eigen::MatrixXd& matCosAng,
123 int iStiffness,
124 int iNLegendreTerms);
125
129 static Eigen::MatrixXd evaluateLegendre(const Eigen::MatrixXd& matX, int iMaxOrder);
130};
131
132} // namespace UTILSLIB
133
134#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)