v2.0.0
Loading...
Searching...
No Matches
mne_surface.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef MNE_SURFACE_H
38#define MNE_SURFACE_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "mne_global.h"
46
47//=============================================================================================================
48// EIGEN INCLUDES
49//=============================================================================================================
50
51#include <Eigen/Core>
52
53//=============================================================================================================
54// QT INCLUDES
55//=============================================================================================================
56
57#include <memory>
58
59//=============================================================================================================
60// DEFINE NAMESPACE MNELIB
61//=============================================================================================================
62
63namespace MNELIB
64{
65
66//=============================================================================================================
67// FORWARD DECLARATIONS
68//=============================================================================================================
69
70class MNEProjData;
71
72//=============================================================================================================
79{
80public:
81 typedef std::shared_ptr<MNESurface> SPtr;
82 typedef std::shared_ptr<const MNESurface> ConstSPtr;
83
84 //=========================================================================================================
88 MNESurface();
89
90 //=========================================================================================================
95
96 //=========================================================================================================
97 // Surface geometry const methods
98 //=========================================================================================================
99
107 double sum_solids(const Eigen::Vector3f& from) const;
108
118 void triangle_coords(const Eigen::Vector3f& r, int tri,
119 float &x, float &y, float &z) const;
120
132 int nearest_triangle_point(const Eigen::Vector3f& r,
133 const MNEProjData *user,
134 int tri,
135 float &x, float &y, float &z) const;
136
147 int nearest_triangle_point(const Eigen::Vector3f& r,
148 int tri,
149 float &x, float &y, float &z) const;
150
159 Eigen::Vector3f project_to_triangle(int tri, float p, float q) const;
160
168 Eigen::Vector3f project_to_triangle(int best, const Eigen::Vector3f& r) const;
169
178 int project_to_surface(const MNEProjData *proj_data,
179 const Eigen::Vector3f& r,
180 float &distp) const;
181
192 void find_closest_on_surface_approx(const PointsT& r, int np,
193 Eigen::VectorXi& nearest_tri,
194 Eigen::VectorXf& dist,
195 int nstep) const;
196
206 int approx_best,
207 int nstep,
208 const Eigen::Vector3f& r) const;
209
217 void activate_neighbors(int start, Eigen::VectorXi &act, int nstep) const;
218
219 //=========================================================================================================
220 // Non-const mutator
221 //=========================================================================================================
222
223 //=========================================================================================================
224 // Static factory methods
225 //=========================================================================================================
226
236 static MNESurface* read_bem_surface(const QString& name, int which,
237 int add_geometry, float *sigmap);
238
248 static MNESurface* read_bem_surface2(const QString& name, int which,
249 int add_geometry, float *sigmap);
250
261 static MNESurface* read_bem_surface(const QString& name, int which,
262 int add_geometry, float *sigmap,
263 bool check_too_many_neighbors);
264};
265
266//=============================================================================================================
267// INLINE DEFINITIONS
268//=============================================================================================================
269} // NAMESPACE MNELIB
270
271#endif // MNE_SURFACE_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
MNE Surface or Volume (MNESurfaceOrVolume) class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
Auxiliary projection data computed from MNEProjOp for efficient repeated application.
double sum_solids(const Eigen::Vector3f &from) const
void find_closest_on_surface_approx(const PointsT &r, int np, Eigen::VectorXi &nearest_tri, Eigen::VectorXf &dist, int nstep) const
static MNESurface * read_bem_surface2(const QString &name, int which, int add_geometry, float *sigmap)
Eigen::Vector3f project_to_triangle(int tri, float p, float q) const
void triangle_coords(const Eigen::Vector3f &r, int tri, float &x, float &y, float &z) const
std::shared_ptr< const MNESurface > ConstSPtr
Definition mne_surface.h:82
int project_to_surface(const MNEProjData *proj_data, const Eigen::Vector3f &r, float &distp) const
std::shared_ptr< MNESurface > SPtr
Definition mne_surface.h:81
void decide_search_restriction(MNEProjData &p, int approx_best, int nstep, const Eigen::Vector3f &r) const
static MNESurface * read_bem_surface(const QString &name, int which, int add_geometry, float *sigmap)
int nearest_triangle_point(const Eigen::Vector3f &r, const MNEProjData *user, int tri, float &x, float &y, float &z) const
void activate_neighbors(int start, Eigen::VectorXi &act, int nstep) const
MNESurfaceOrVolume()
Constructs the MNE Surface or Volume.
FIFFLIB::FiffSparseMatrix dist
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > PointsT