MNEBemSurface
Namespace: MNELIB · Library: MNE Library
#include <mne/mne_bem_surface.h>
class MNELIB::MNEBemSurface
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.
BEM surface provides geometry information
QFile bemFile(data + "/subjects/sample/bem/sample-5120-bem.fif");
MNEBem bem(bemFile); // one MNEBemSurface per BEM layer
const MNEBemSurface& innerSkull = bem[0];
Inheritance
Public Methods
MNEBemSurface()
Constructors the bem surface.
MNEBemSurface(p_MNEBemSurface)
Copy constructor.
Parameters:
- p_MNEBemSurface : const MNEBemSurface & BEM surface which should be copied.
operator=(other)
Copy assignment.
Every member has value semantics, so the compiler-generated member-wise assignment is correct. It is declared explicitly because declaring a copy constructor and/or a destructor deprecates the implicitly generated one.
Parameters:
- other : const MNEBemSurface & Object to assign from.
Returns:
- MNEBemSurface & — reference to this object.
~MNEBemSurface()
Destroys the BEM surface.
clear()
Initializes the BEM surface.
addTriangleData()
Definition of the mne_add_triangle_data function in mne_add_geometry_info.c.
Completes triangulation info
Returns:
- bool — true if succeeded, false otherwise.
add_geometry_info()
Add vertex normals and neighbourhood information.
Returns:
- bool — true if succeeded, false otherwise.
addVertexNormals()
Definition of the addVertexNormals function in mne_add_geometry_info.c.
Completes triangulation info
Returns:
- bool — true if succeeded, false otherwise.
Static Methods
id_name(id)
Map bem id integers to human-readable names.
Parameters:
- id : int The bem id integer.
Returns:
- QString — Human readable form of the bem id.
makeScalpSurfaces(outerSkin, targetVertices)
Decimate the outer skin surface to the target vertex counts using iterative edge collapse simplification.
Parameters:
-
outerSkin : const MNEBemSurface & The outer skin BEM surface to decimate.
-
targetVertices : const QList< int > & List of target vertex counts (default: {2562, 10242, 40962}).
Returns:
- QList< MNEBemSurface > — A list of decimated BEM surfaces, one per target resolution.
Example
- Full source:
src/examples/ex_mne_api/main.cpp - Build target:
ex_mne_api(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_mne_api
MNE library: BEM surfaces, surface projection, ICP, source spaces and epochs.
QFile bemFile(data + "/subjects/sample/bem/sample-5120-bem.fif");
MNEBem bem(bemFile); // one MNEBemSurface per BEM layer
const MNEBemSurface& innerSkull = bem[0];
// mne.read_bem_surfaces: 1 surface, id 1 (inner skull), 2562 vertices, 5120 triangles
ok &= expect(bem.size() == 1 && innerSkull.id == FIFFV_BEM_SURF_ID_BRAIN && innerSkull.np == 2562 && innerSkull.ntri == 5120 && (innerSkull.rr.row(0) - RowVector3f(0.0006128f, -0.007984f, 0.103732f)).norm() < 1e-6f && (innerSkull.nn.row(0) - RowVector3f(0.05623665f, -0.1050898f, 0.99287134f)).norm() < 1e-5f && MNEBemSurface::id_name(innerSkull.id) == "Brain",
"MNEBem/MNEBemSurface: inner skull with 2562 vertices and normals like mne.read_bem_surfaces");
Authors of this file
- Jana Kiesel <jana.kiesel@tu-ilmenau.de>
- Lorenz Esch <lorenz.esch@tu-ilmenau.de>
- Juan GPC <jgarciaprieto@mgh.harvard.edu>
- Gabriel Motta <gabrielbenmotta@gmail.com>
- Christoph Dinh <christoph.dinh@mne-cpp.org>