v2.0.0
Loading...
Searching...
No Matches
mne_project_to_surface.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef MNELIB_MNEPROJECTTOSURFACE_H
37#define MNELIB_MNEPROJECTTOSURFACE_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "mne_global.h"
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QSharedPointer>
50
51//=============================================================================================================
52// EIGEN INCLUDES
53//=============================================================================================================
54
55#include <Eigen/Core>
56
57//=============================================================================================================
58// FORWARD DECLARATIONS
59//=============================================================================================================
60
61//=============================================================================================================
62// DEFINE NAMESPACE MNELIB
63//=============================================================================================================
64
65namespace MNELIB {
66
67//=============================================================================================================
68// MNELIB FORWARD DECLARATIONS
69//=============================================================================================================
70
71class MNEBemSurface;
72
73//=============================================================================================================
79
81{
82
83public:
84 typedef QSharedPointer<MNEProjectToSurface> SPtr;
85 typedef QSharedPointer<const MNEProjectToSurface> ConstSPtr;
86
87 //=========================================================================================================
92
93 //=========================================================================================================
99 MNEProjectToSurface(const MNELIB::MNEBemSurface &p_MNEBemSurf);
100
101 //=========================================================================================================
115 bool find_closest_on_surface(const Eigen::MatrixXf &r, const int np, Eigen::MatrixXf &rTri,
116 Eigen::VectorXi &nearest, Eigen::VectorXf &dist);
117
118protected:
119
120private:
121 //=========================================================================================================
134 bool project_to_surface(const Eigen::Vector3f &r, Eigen::Vector3f &rTri, int &bestTri, float &bestDist);
135
136 //=========================================================================================================
150 bool nearest_triangle_point(const Eigen::Vector3f &r, const int tri, float &p, float &q, float &dist);
151
152 //=========================================================================================================
165 bool project_to_triangle(Eigen::Vector3f &rTri, const float p, const float q, const int tri);
166
167 Eigen::MatrixX3f r1;
168 Eigen::MatrixX3f r12;
169 Eigen::MatrixX3f r13;
170 Eigen::MatrixX3f nn;
171 Eigen::VectorXf a;
172 Eigen::VectorXf b;
173 Eigen::VectorXf c;
174 Eigen::VectorXf det;
175};
176
177//=============================================================================================================
178// INLINE DEFINITIONS
179//=============================================================================================================
180} // namespace MNELIB
181
182#endif // MNELIB_MNEPROJECTTOSURFACE_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
Core MNE data structures (source spaces, source estimates, hemispheres).
BEM surface provides geometry information.
QSharedPointer< const MNEProjectToSurface > ConstSPtr
QSharedPointer< MNEProjectToSurface > SPtr
bool find_closest_on_surface(const Eigen::MatrixXf &r, const int np, Eigen::MatrixXf &rTri, Eigen::VectorXi &nearest, Eigen::VectorXf &dist)
find_closest_on_surface