Patch information for a single source space point including vertex members and area. More...
#include <mne_patch_info.h>
Public Types | |
| typedef QSharedPointer< MNEPatchInfo > | SPtr |
| typedef QSharedPointer< const MNEPatchInfo > | ConstSPtr |
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 |
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.
| typedef QSharedPointer<const MNEPatchInfo> MNELIB::MNEPatchInfo::ConstSPtr |
Const shared pointer type for MNEPatchInfo.
Definition at line 81 of file mne_patch_info.h.
| typedef QSharedPointer<MNEPatchInfo> MNELIB::MNEPatchInfo::SPtr |
Shared pointer type for MNEPatchInfo.
Definition at line 80 of file mne_patch_info.h.
| 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.
|
default |
Destroys the MNE Patch Information Refactored: mne_free_patch (mne_source_space.c)
| 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).
| [in] | s | Pointer to the source space containing the triangle mesh (neighbor triangles and triangle areas). |
Definition at line 78 of file mne_patch_info.cpp.
| 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.
| [in] | s | Pointer to the source space containing vertex normals (nn) for each vertex in the mesh. |
Definition at line 94 of file mne_patch_info.cpp.
| float MNELIB::MNEPatchInfo::area |
Total surface area of the patch (m^2).
Definition at line 130 of file mne_patch_info.h.
| float MNELIB::MNEPatchInfo::ave_nn[3] |
Average outward surface normal of the patch.
Definition at line 131 of file mne_patch_info.h.
| 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.
| Eigen::VectorXi MNELIB::MNEPatchInfo::memb_vert |
Vertex indices that constitute the patch.
Definition at line 129 of file mne_patch_info.h.
| int MNELIB::MNEPatchInfo::vert |
Source vertex index this patch applies to.
Definition at line 128 of file mne_patch_info.h.