v2.0.0
Loading...
Searching...
No Matches
MNELIB::MNEBemSurface Class Reference

BEM surface provides geometry information. More...

#include <mne_bem_surface.h>

Public Types

typedef QSharedPointer< MNEBemSurfaceSPtr
typedef QSharedPointer< const MNEBemSurfaceConstSPtr
Public Types inherited from MNELIB::MNESurface
typedef std::shared_ptr< MNESurfaceSPtr
typedef std::shared_ptr< const MNESurfaceConstSPtr
Public Types inherited from MNELIB::MNESurfaceOrVolume
typedef QSharedPointer< MNESurfaceOrVolumeSPtr
typedef QSharedPointer< const MNESurfaceOrVolumeConstSPtr
typedef Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > PointsT
typedef Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > NormalsT
typedef Eigen::Matrix< int, Eigen::Dynamic, 3, Eigen::RowMajor > TrianglesT

Public Member Functions

 MNEBemSurface ()
 MNEBemSurface (const MNEBemSurface &p_MNEBemSurface)
 ~MNEBemSurface ()
void clear ()
bool addTriangleData ()
bool add_geometry_info ()
bool addVertexNormals ()
void writeToStream (FIFFLIB::FiffStream *p_pStream)
Public Member Functions inherited from MNELIB::MNESurface
 MNESurface ()
 ~MNESurface ()
double sum_solids (const Eigen::Vector3f &from) const
void triangle_coords (const Eigen::Vector3f &r, int tri, float &x, float &y, float &z) const
int nearest_triangle_point (const Eigen::Vector3f &r, const MNEProjData *user, int tri, float &x, float &y, float &z) const
int nearest_triangle_point (const Eigen::Vector3f &r, int tri, float &x, float &y, float &z) const
Eigen::Vector3f project_to_triangle (int tri, float p, float q) const
Eigen::Vector3f project_to_triangle (int best, const Eigen::Vector3f &r) const
int project_to_surface (const MNEProjData *proj_data, const Eigen::Vector3f &r, float &distp) const
void find_closest_on_surface_approx (const PointsT &r, int np, Eigen::VectorXi &nearest_tri, Eigen::VectorXf &dist, int nstep) const
void decide_search_restriction (MNEProjData &p, int approx_best, int nstep, const Eigen::Vector3f &r) const
void activate_neighbors (int start, Eigen::VectorXi &act, int nstep) const
Public Member Functions inherited from MNELIB::MNESurfaceOrVolume
 MNESurfaceOrVolume ()
 Constructs the MNE Surface or Volume.
virtual ~MNESurfaceOrVolume ()
 Destroys the MNE Surface or Volume description.
 MNESurfaceOrVolume (const MNESurfaceOrVolume &)=default
MNESurfaceOrVolumeoperator= (const MNESurfaceOrVolume &)=default
 MNESurfaceOrVolume (MNESurfaceOrVolume &&)=default
MNESurfaceOrVolumeoperator= (MNESurfaceOrVolume &&)=default
void add_uniform_curv ()
void add_triangle_data ()
void compute_surface_cm ()
void calculate_vertex_distances ()
int add_vertex_normals ()
int add_geometry_info (int do_normals, int check_too_many_neighbors)
int add_geometry_info (int do_normals)
int add_geometry_info2 (int do_normals)
Eigen::VectorXi nearestVertIdx () const
Eigen::VectorXd nearestDistVec () const
void setNearestData (const Eigen::VectorXi &nearestIdx, const Eigen::VectorXd &nearestDist)

Static Public Member Functions

static QString id_name (int id)
Static Public Member Functions inherited from MNELIB::MNESurface
static MNESurfaceread_bem_surface (const QString &name, int which, int add_geometry, float *sigmap)
static MNESurfaceread_bem_surface2 (const QString &name, int which, int add_geometry, float *sigmap)
static MNESurfaceread_bem_surface (const QString &name, int which, int add_geometry, float *sigmap, bool check_too_many_neighbors)
Static Public Member Functions inherited from MNELIB::MNESurfaceOrVolume
static double solid_angle (const Eigen::Vector3f &from, const MNELIB::MNETriangle &tri)
static void compute_cm (const PointsT &rr, int np, float(&cm)[3])

Public Attributes

Eigen::MatrixX3d tri_cent
Eigen::MatrixX3d tri_nn
Eigen::VectorXd tri_area
Public Attributes inherited from MNELIB::MNESurfaceOrVolume
int type
QString subject
int id
int coord_frame
std::optional< MNEVolGeomvol_geom
std::optional< MNEMghTagGroupmgh_tags
int np
PointsT rr
NormalsT nn
float cm [3]
Eigen::VectorXi inuse
Eigen::VectorXi vertno
int nuse
std::vector< Eigen::VectorXi > neighbor_vert
Eigen::VectorXi nneighbor_vert
std::vector< Eigen::VectorXf > vert_dist
float sigma
int ntri
std::vector< MNETriangletris
TrianglesT itris
float tot_area
int nuse_tri
std::vector< MNETriangleuse_tris
TrianglesT use_itris
std::vector< Eigen::VectorXi > neighbor_tri
Eigen::VectorXi nneighbor_tri
std::vector< MNENearestnearest
std::vector< std::optional< MNEPatchInfo > > patches
FIFFLIB::FiffSparseMatrix dist
float dist_limit
Eigen::VectorXf curv
Eigen::VectorXf val
std::optional< FIFFLIB::FiffCoordTransvoxel_surf_RAS_t
int vol_dims [3]
float voxel_size [3]
std::optional< FIFFLIB::FiffSparseMatrixinterpolator
QString MRI_volume
std::optional< FIFFLIB::FiffCoordTransMRI_voxel_surf_RAS_t
std::optional< FIFFLIB::FiffCoordTransMRI_surf_RAS_RAS_t
int MRI_vol_dims [3]

Detailed Description

BEM surface provides geometry information.

BEM surface geometry information.

Inherits core geometry (vertices, normals, triangles, neighbors) from MNESurface/MNESurfaceOrVolume. Adds BEM-specific computed triangle metadata (centers, normals, areas) and I/O.

Definition at line 85 of file mne_bem_surface.h.

Inheritance diagram for MNELIB::MNEBemSurface:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const MNEBemSurface> MNELIB::MNEBemSurface::ConstSPtr

Const shared pointer type for MNEBemSurface.

Definition at line 89 of file mne_bem_surface.h.

◆ SPtr

typedef QSharedPointer<MNEBemSurface> MNELIB::MNEBemSurface::SPtr

Shared pointer type for MNEBemSurface.

Definition at line 88 of file mne_bem_surface.h.

Constructor & Destructor Documentation

◆ MNEBemSurface() [1/2]

MNEBemSurface::MNEBemSurface ( )

Constructors the bem surface.

Definition at line 56 of file mne_bem_surface.cpp.

◆ MNEBemSurface() [2/2]

MNEBemSurface::MNEBemSurface ( const MNEBemSurface & p_MNEBemSurface)

Copy constructor.

Parameters
[in]p_MNEBemSurfaceBEM surface which should be copied.

Definition at line 71 of file mne_bem_surface.cpp.

◆ ~MNEBemSurface()

MNEBemSurface::~MNEBemSurface ( )

Destroys the BEM surface.

Definition at line 91 of file mne_bem_surface.cpp.

Member Function Documentation

◆ add_geometry_info()

bool MNEBemSurface::add_geometry_info ( )

Add vertex normals and neighbourhood information

Returns
true if succeeded, false otherwise.

Definition at line 179 of file mne_bem_surface.cpp.

◆ addTriangleData()

bool MNEBemSurface::addTriangleData ( )

Definition of the mne_add_triangle_data function in mne_add_geometry_info.c

Completes triangulation info

Returns
true if succeeded, false otherwise.

Definition at line 116 of file mne_bem_surface.cpp.

◆ addVertexNormals()

bool MNEBemSurface::addVertexNormals ( )

Definition of the addVertexNormals function in mne_add_geometry_info.c

Completes triangulation info

Returns
true if succeeded, false otherwise.

Definition at line 235 of file mne_bem_surface.cpp.

◆ clear()

void MNEBemSurface::clear ( )

Initializes the BEM surface.

Definition at line 97 of file mne_bem_surface.cpp.

◆ id_name()

QString MNEBemSurface::id_name ( int id)
static

Map bem id integers to human-readable names

Parameters
[in]frameThe bem id integer.
Returns
Human readable form of the bem id.

Definition at line 288 of file mne_bem_surface.cpp.

◆ writeToStream()

void MNEBemSurface::writeToStream ( FIFFLIB::FiffStream * p_pStream)

Writes the bem surface to a FIFF stream

Parameters
[in]p_pStreamThe stream to write to.

Definition at line 270 of file mne_bem_surface.cpp.

Member Data Documentation

◆ tri_area

Eigen::VectorXd MNELIB::MNEBemSurface::tri_area

Triangle areas.

Definition at line 166 of file mne_bem_surface.h.

◆ tri_cent

Eigen::MatrixX3d MNELIB::MNEBemSurface::tri_cent

Triangle centers.

Definition at line 164 of file mne_bem_surface.h.

◆ tri_nn

Eigen::MatrixX3d MNELIB::MNEBemSurface::tri_nn

Triangle normals.

Definition at line 165 of file mne_bem_surface.h.


The documentation for this class was generated from the following files: