Skip to main content

MNESurfacePatch

Namespace: MNELIB  ·  Library: MNE Library

#include <mne/mne_surface_patch.h>

class MNELIB::MNESurfacePatch

Cortical surface patch linking a set of vertices to a single source space point.

Each patch represents a contiguous region of a FreeSurfer cortical surface. It stores the mapping between patch-local and full-surface vertex/triangle indices and marks which vertices lie on the patch border.


Public Methods​

MNESurfacePatch(np)​

Constructs a patch with np vertices.

Parameters:

  • np : int Number of vertices in the patch (0 for an empty patch).

~MNESurfacePatch()​

Destroys the MNESurfacePatch.


Example​

No example of its own: Flat display patch of the legacy MNE-C mesh viewer held by MNEMshDisplaySurfaceSet; UI state with no computation to demonstrate.

It is exercised by:

src/examples/ex_mne_api/main.cpp
// Total solid angle seen from a point: 4 pi inside a closed surface, 0 outside
auto skull = MNESurface::read_bem_surface2(bemFile.fileName(), FIFFV_BEM_SURF_ID_BRAIN, true);
skull->compute_surface_cm();
const double inside = skull->sum_solids(Map<const Vector3f>(skull->cm)) / (4.0 * M_PI);
const double outside = skull->sum_solids(Vector3f(0.0f, 0.0f, 0.2f)) / (4.0 * M_PI);

// The same surface as an MNE-C viewer display surface
MNEMshDisplaySurfaceSet display;
display.add_bem_surface(bemFile.fileName(), FIFFV_BEM_SURF_ID_BRAIN, "inner skull", 1, 1); // checks closure
const MNEMshDisplaySurface& shown = *display.surfs[0];

From ex_mne_api.

Authors of this file​