v2.0.0
Loading...
Searching...
No Matches
mne_surface.h
Go to the documentation of this file.
1//=============================================================================================================
23
24#ifndef MNE_SURFACE_H
25#define MNE_SURFACE_H
26
27//=============================================================================================================
28// INCLUDES
29//=============================================================================================================
30
31#include "mne_global.h"
33
34//=============================================================================================================
35// EIGEN INCLUDES
36//=============================================================================================================
37
38#include <Eigen/Core>
39
40//=============================================================================================================
41// QT INCLUDES
42//=============================================================================================================
43
44#include <memory>
45
46//=============================================================================================================
47// DEFINE NAMESPACE MNELIB
48//=============================================================================================================
49
50namespace MNELIB
51{
52
53//=============================================================================================================
54// FORWARD DECLARATIONS
55//=============================================================================================================
56
57class MNEProjData;
58
59//=============================================================================================================
66{
67public:
68 typedef std::shared_ptr<MNESurface> SPtr;
69 typedef std::shared_ptr<const MNESurface> ConstSPtr;
70 typedef std::unique_ptr<MNESurface> UPtr;
71
72 //=========================================================================================================
76 MNESurface();
77
78 //=========================================================================================================
83
84 //=========================================================================================================
85 // FsSurface geometry const methods
86 //=========================================================================================================
87
95 double sum_solids(const Eigen::Vector3f& from) const;
96
106 void triangle_coords(const Eigen::Vector3f& r, int tri,
107 float &x, float &y, float &z) const;
108
120 int nearest_triangle_point(const Eigen::Vector3f& r,
121 const MNEProjData *user,
122 int tri,
123 float &x, float &y, float &z) const;
124
135 int nearest_triangle_point(const Eigen::Vector3f& r,
136 int tri,
137 float &x, float &y, float &z) const;
138
147 Eigen::Vector3f project_to_triangle(int tri, float p, float q) const;
148
156 Eigen::Vector3f project_to_triangle(int best, const Eigen::Vector3f& r) const;
157
166 int project_to_surface(const MNEProjData *proj_data,
167 const Eigen::Vector3f& r,
168 float &distp) const;
169
180 void find_closest_on_surface_approx(const PointsT& r, int np,
181 Eigen::VectorXi& nearest_tri,
182 Eigen::VectorXf& dist,
183 int nstep) const;
184
194 int approx_best,
195 int nstep,
196 const Eigen::Vector3f& r) const;
197
205 void activate_neighbors(int start, Eigen::VectorXi &act, int nstep) const;
206
207 //=========================================================================================================
208 // Non-const mutator
209 //=========================================================================================================
210
211 //=========================================================================================================
212 // Static factory methods
213 //=========================================================================================================
214
223 static std::unique_ptr<MNESurface> read_bem_surface(const QString& name, int which,
224 bool add_geometry);
225
235 static std::unique_ptr<MNESurface> read_bem_surface(const QString& name, int which,
236 bool add_geometry, float& sigma);
237
246 static std::unique_ptr<MNESurface> read_bem_surface2(const QString& name, int which,
247 bool add_geometry);
248
259 static std::unique_ptr<MNESurface> read_bem_surface(const QString& name, int which,
260 bool add_geometry, float& sigma,
261 bool check_too_many_neighbors);
262};
263
264//=============================================================================================================
265// INLINE DEFINITIONS
266//=============================================================================================================
267} // NAMESPACE MNELIB
268
269#endif // MNE_SURFACE_H
Discriminated geometry container that can represent either a triangulated surface or a discrete/volum...
MNELIB shared-library export/import macros and library build metadata.
#define MNESHARED_EXPORT
Definition mne_global.h:40
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
std::unique_ptr< MNESurface > UPtr
Definition mne_surface.h:70
Eigen::Vector3f project_to_triangle(int tri, float p, float q) const
static std::unique_ptr< MNESurface > read_bem_surface2(const QString &name, int which, bool add_geometry)
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:69
static std::unique_ptr< MNESurface > read_bem_surface(const QString &name, int which, bool add_geometry)
int project_to_surface(const MNEProjData *proj_data, const Eigen::Vector3f &r, float &distp) const
std::shared_ptr< MNESurface > SPtr
Definition mne_surface.h:68
void decide_search_restriction(MNEProjData &p, int approx_best, int nstep, const Eigen::Vector3f &r) const
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 FsSurface or Volume.
FIFFLIB::FiffSparseMatrix dist
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > PointsT