MNEPatchInfo
Namespace: MNELIB · Library: MNE Library
#include <mne/mne_patch_info.h>
class MNELIB::MNEPatchInfo
Implements an MNE Patch Information (Replaces *mnePatchInfo,mnePatchInfoRec; struct of MNE-C mne_types.h).
Patch information for a single source space point including vertex members and area.
Public Methods
MNEPatchInfo()
Constructs the MNE Patch Information Refactored: mne_new_patch (mne_source_space.c).
~MNEPatchInfo()
Destroys the MNE Patch Information Refactored: mne_free_patch (mne_source_space.c).
calculate_area(s)
Calculates the total surface area of this patch.
Iterates over all member vertices of the patch. For each vertex, sums one-third of the area of every neighboring triangle. The factor of 1/3 accounts for each triangle being shared among its three vertices. The result is stored in the member variable area.
Refactored from: calculate_patch_area (mne_patches.c).
Parameters:
- s : *MNESourceSpace ** Pointer to the source space containing the triangle mesh (neighbor triangles and triangle areas).
calculate_normal_stats(s)
Calculates the average surface normal and its deviation for this patch.
Computes the mean normal direction (ave_nn) by summing the normals of all member vertices and normalizing the result to unit length. Then computes the average angular deviation (dev_nn) of each member vertex normal from the mean normal, in radians, using the arccosine of the dot product.
Parameters:
- s : *MNESourceSpace ** Pointer to the source space containing vertex normals (nn) for each vertex in the mesh.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>