MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
mne_project_to_surface.h
Go to the documentation of this file.
1//=============================================================================================================
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;
72class MNESurface;
73
74//TODO this needs to be removed - this has to be a function not a class!!!
75
76//=============================================================================================================
84{
85
86public:
87 typedef QSharedPointer<MNEProjectToSurface> SPtr;
88 typedef QSharedPointer<const MNEProjectToSurface> ConstSPtr;
90 //=========================================================================================================
95
96 //=========================================================================================================
102 MNEProjectToSurface(const MNELIB::MNEBemSurface &p_MNEBemSurf);
103
104 //=========================================================================================================
110 MNEProjectToSurface(const MNELIB::MNESurface &p_MNESurf);
111
112 //=========================================================================================================
126 bool mne_find_closest_on_surface(const Eigen::MatrixXf &r, const int np, Eigen::MatrixXf &rTri,
127 Eigen::VectorXi &nearest, Eigen::VectorXf &dist);
128
129protected:
130
131private:
132 //=========================================================================================================
145 bool mne_project_to_surface(const Eigen::Vector3f &r, Eigen::Vector3f &rTri, int &bestTri, float &bestDist);
146
147 //=========================================================================================================
161 bool nearest_triangle_point(const Eigen::Vector3f &r, const int tri, float &p, float &q, float &dist);
162
163 //=========================================================================================================
176 bool project_to_triangle(Eigen::Vector3f &rTri, const float p, const float q, const int tri);
177
178 Eigen::MatrixX3f r1;
179 Eigen::MatrixX3f r12;
180 Eigen::MatrixX3f r13;
181 Eigen::MatrixX3f nn;
182 Eigen::VectorXf a;
183 Eigen::VectorXf b;
184 Eigen::VectorXf c;
185 Eigen::VectorXf det;
186};
187
188//=============================================================================================================
189// INLINE DEFINITIONS
190//=============================================================================================================
191} // namespace MNELIB
192
193#endif // MNELIB_MNEPROJECTTOSURFACE_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:56
BEM surface provides geometry information.
Brief description of this class.
QSharedPointer< const MNEProjectToSurface > ConstSPtr
QSharedPointer< MNEProjectToSurface > SPtr
BEM Surface.
Definition mne_surface.h:83