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

Patch information for a single source space point including vertex members and area. More...

#include <mne_patch_info.h>

Public Types

typedef QSharedPointer< MNEPatchInfoSPtr
typedef QSharedPointer< const MNEPatchInfoConstSPtr

Public Member Functions

 MNEPatchInfo ()
 ~MNEPatchInfo ()
void calculate_area (MNESourceSpace *s)
void calculate_normal_stats (MNESourceSpace *s)

Public Attributes

int vert
Eigen::VectorXi memb_vert
float area
float ave_nn [3]
float dev_nn

Detailed Description

Patch information for a single source space point including vertex members and area.

Implements an MNE Patch Information (Replaces *mnePatchInfo,mnePatchInfoRec; struct of MNE-C mne_types.h).

Definition at line 77 of file mne_patch_info.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for MNEPatchInfo.

Definition at line 81 of file mne_patch_info.h.

◆ SPtr

typedef QSharedPointer<MNEPatchInfo> MNELIB::MNEPatchInfo::SPtr

Shared pointer type for MNEPatchInfo.

Definition at line 80 of file mne_patch_info.h.

Constructor & Destructor Documentation

◆ MNEPatchInfo()

MNEPatchInfo::MNEPatchInfo ( )

Constructs the MNE Patch Information Refactored: mne_new_patch (mne_source_space.c)

Definition at line 62 of file mne_patch_info.cpp.

◆ ~MNEPatchInfo()

MNEPatchInfo::~MNEPatchInfo ( )
default

Destroys the MNE Patch Information Refactored: mne_free_patch (mne_source_space.c)

Member Function Documentation

◆ calculate_area()

void MNEPatchInfo::calculate_area ( MNESourceSpace * 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
[in]sPointer to the source space containing the triangle mesh (neighbor triangles and triangle areas).

Definition at line 78 of file mne_patch_info.cpp.

◆ calculate_normal_stats()

void MNEPatchInfo::calculate_normal_stats ( MNESourceSpace * 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
[in]sPointer to the source space containing vertex normals (nn) for each vertex in the mesh.

Definition at line 94 of file mne_patch_info.cpp.

Member Data Documentation

◆ area

float MNELIB::MNEPatchInfo::area

Total surface area of the patch (m^2).

Definition at line 130 of file mne_patch_info.h.

◆ ave_nn

float MNELIB::MNEPatchInfo::ave_nn[3]

Average outward surface normal of the patch.

Definition at line 131 of file mne_patch_info.h.

◆ dev_nn

float MNELIB::MNEPatchInfo::dev_nn

Average angular deviation of member normals from ave_nn (radians).

Definition at line 132 of file mne_patch_info.h.

◆ memb_vert

Eigen::VectorXi MNELIB::MNEPatchInfo::memb_vert

Vertex indices that constitute the patch.

Definition at line 129 of file mne_patch_info.h.

◆ vert

int MNELIB::MNEPatchInfo::vert

Source vertex index this patch applies to.

Definition at line 128 of file mne_patch_info.h.


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