v2.0.0
Loading...
Searching...
No Matches
mne_proj_data.cpp
Go to the documentation of this file.
1//=============================================================================================================
35
36//=============================================================================================================
37// INCLUDES
38//=============================================================================================================
39
40#include "mne_proj_data.h"
41#include "mne_surface.h"
42#include "mne_triangle.h"
43
44#ifndef TRUE
45#define TRUE 1
46#endif
47
48#define X_46 0
49#define Y_46 1
50#define Z_46 2
51
52#define VEC_DOT_46(x,y) ((x)[X_46]*(y)[X_46] + (x)[Y_46]*(y)[Y_46] + (x)[Z_46]*(y)[Z_46])
53
54//=============================================================================================================
55// USED NAMESPACES
56//=============================================================================================================
57
58using namespace MNELIB;
59
60//=============================================================================================================
61// DEFINE MEMBER METHODS
62//=============================================================================================================
63
65{
66 a.resize(s->ntri);
67 b.resize(s->ntri);
68 c.resize(s->ntri);
69 act.resize(s->ntri);
70
71 const MNETriangle* tri = s->tris.data();
72 for (int k = 0; k < s->ntri; k++, tri++) {
73 a[k] = VEC_DOT_46(tri->r12,tri->r12);
74 b[k] = VEC_DOT_46(tri->r13,tri->r13);
75 c[k] = VEC_DOT_46(tri->r12,tri->r13);
76
77 act[k] = TRUE;
78 }
79 nactive = s->ntri;
80}
MNETriangle class declaration.
MNESurface class declaration.
MNEProjData class declaration.
#define VEC_DOT_46(x, y)
#define TRUE
Core MNE data structures (source spaces, source estimates, hemispheres).
Eigen::VectorXf b
Eigen::VectorXf c
Eigen::VectorXi act
MNEProjData(const MNELIB::MNESurface *s)
Eigen::VectorXf a
This defines a surface.
Definition mne_surface.h:79
std::vector< MNETriangle > tris
Per-triangle geometric data for a cortical or BEM surface.
Eigen::Vector3f r13
Eigen::Vector3f r12