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 typedef std::unique_ptr<MNESurface> UPtr;
84
85 //=========================================================================================================
89 MNESurface();
90
91 //=========================================================================================================
96
97 //=========================================================================================================
98 // FsSurface geometry const methods
99 //=========================================================================================================
100
108 double sum_solids(const Eigen::Vector3f& from) const;
109
119 void triangle_coords(const Eigen::Vector3f& r, int tri,
120 float &x, float &y, float &z) const;
121
133 int nearest_triangle_point(const Eigen::Vector3f& r,
134 const MNEProjData *user,
135 int tri,
136 float &x, float &y, float &z) const;
137
148 int nearest_triangle_point(const Eigen::Vector3f& r,
149 int tri,
150 float &x, float &y, float &z) const;
151
160 Eigen::Vector3f project_to_triangle(int tri, float p, float q) const;
161
169 Eigen::Vector3f project_to_triangle(int best, const Eigen::Vector3f& r) const;
170
179 int project_to_surface(const MNEProjData *proj_data,
180 const Eigen::Vector3f& r,
181 float &distp) const;
182
193 void find_closest_on_surface_approx(const PointsT& r, int np,
194 Eigen::VectorXi& nearest_tri,
195 Eigen::VectorXf& dist,
196 int nstep) const;
197
207 int approx_best,
208 int nstep,
209 const Eigen::Vector3f& r) const;
210
218 void activate_neighbors(int start, Eigen::VectorXi &act, int nstep) const;
219
220 //=========================================================================================================
221 // Non-const mutator
222 //=========================================================================================================
223
224 //=========================================================================================================
225 // Static factory methods
226 //=========================================================================================================
227
237 static MNESurface* read_bem_surface(const QString& name, int which,
238 int add_geometry, float *sigmap);
239
249 static MNESurface* read_bem_surface2(const QString& name, int which,
250 int add_geometry, float *sigmap);
251
262 static MNESurface* read_bem_surface(const QString& name, int which,
263 int add_geometry, float *sigmap,
264 bool check_too_many_neighbors);
265};
266
267//=============================================================================================================
268// INLINE DEFINITIONS
269//=============================================================================================================
270} // NAMESPACE MNELIB
271
272#endif // MNE_SURFACE_H
mne library export/import macros.
#define MNESHARED_EXPORT
Definition mne_global.h:52
MNE FsSurface 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
std::unique_ptr< MNESurface > UPtr
Definition mne_surface.h:83
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 FsSurface or Volume.
FIFFLIB::FiffSparseMatrix dist
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > PointsT