The MNE Msh Display Surface class holds information about a surface to be rendered. More...
#include <mne_msh_display_surface.h>
Public Types | |
| typedef QSharedPointer< MNEMshDisplaySurface > | SPtr |
| typedef QSharedPointer< const MNEMshDisplaySurface > | ConstSPtr |
| Public Types inherited from MNELIB::MNESurface | |
| typedef std::shared_ptr< MNESurface > | SPtr |
| typedef std::shared_ptr< const MNESurface > | ConstSPtr |
| Public Types inherited from MNELIB::MNESurfaceOrVolume | |
| typedef QSharedPointer< MNESurfaceOrVolume > | SPtr |
| typedef QSharedPointer< const MNESurfaceOrVolume > | ConstSPtr |
| typedef Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > | PointsT |
| typedef Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > | NormalsT |
| typedef Eigen::Matrix< int, Eigen::Dynamic, 3, Eigen::RowMajor > | TrianglesT |
Public Member Functions | |
| MNEMshDisplaySurface () | |
| ~MNEMshDisplaySurface () | |
| int | align_fiducials (FIFFLIB::FiffDigitizerData &head_dig, const FIFFLIB::FiffDigitizerData &mri_dig, int niter, int scale_head, float omit_dist, Eigen::Vector3f &scales) |
| void | get_head_scale (FIFFLIB::FiffDigitizerData &dig, const Eigen::Matrix< float, 3, 3, Eigen::RowMajor > &mri_fid, Eigen::Vector3f &scales) |
| int | discard_outlier_digitizer_points (FIFFLIB::FiffDigitizerData &d, float maxdist) const |
| void | calculate_digitizer_distances (FIFFLIB::FiffDigitizerData &dig, int do_all, int do_approx) const |
| int | iterate_alignment_once (FIFFLIB::FiffDigitizerData &dig, int nasion_weight, const std::optional< Eigen::Vector3f > &nasion_mri, int last_step) const |
| float | rms_digitizer_distance (FIFFLIB::FiffDigitizerData &dig) const |
| void | scale (const Eigen::Vector3f &scales) |
| void | decide_surface_extent (const QString &tag) |
| void | decide_curv_display (const QString &name) |
| void | setup_curvature_colors () |
| Public Member Functions inherited from MNELIB::MNESurface | |
| MNESurface () | |
| ~MNESurface () | |
| double | sum_solids (const Eigen::Vector3f &from) const |
| void | triangle_coords (const Eigen::Vector3f &r, int tri, float &x, float &y, float &z) const |
| int | nearest_triangle_point (const Eigen::Vector3f &r, const MNEProjData *user, int tri, float &x, float &y, float &z) const |
| int | nearest_triangle_point (const Eigen::Vector3f &r, int tri, float &x, float &y, float &z) const |
| Eigen::Vector3f | project_to_triangle (int tri, float p, float q) const |
| Eigen::Vector3f | project_to_triangle (int best, const Eigen::Vector3f &r) const |
| int | project_to_surface (const MNEProjData *proj_data, const Eigen::Vector3f &r, float &distp) const |
| void | find_closest_on_surface_approx (const PointsT &r, int np, Eigen::VectorXi &nearest_tri, Eigen::VectorXf &dist, int nstep) const |
| void | decide_search_restriction (MNEProjData &p, int approx_best, int nstep, const Eigen::Vector3f &r) const |
| void | activate_neighbors (int start, Eigen::VectorXi &act, int nstep) const |
| Public Member Functions inherited from MNELIB::MNESurfaceOrVolume | |
| MNESurfaceOrVolume () | |
| Constructs the MNE Surface or Volume. | |
| virtual | ~MNESurfaceOrVolume () |
| Destroys the MNE Surface or Volume description. | |
| MNESurfaceOrVolume (const MNESurfaceOrVolume &)=default | |
| MNESurfaceOrVolume & | operator= (const MNESurfaceOrVolume &)=default |
| MNESurfaceOrVolume (MNESurfaceOrVolume &&)=default | |
| MNESurfaceOrVolume & | operator= (MNESurfaceOrVolume &&)=default |
| void | add_uniform_curv () |
| void | add_triangle_data () |
| void | compute_surface_cm () |
| void | calculate_vertex_distances () |
| int | add_vertex_normals () |
| int | add_geometry_info (int do_normals, int check_too_many_neighbors) |
| int | add_geometry_info (int do_normals) |
| int | add_geometry_info2 (int do_normals) |
| Eigen::VectorXi | nearestVertIdx () const |
| Eigen::VectorXd | nearestDistVec () const |
| void | setNearestData (const Eigen::VectorXi &nearestIdx, const Eigen::VectorXd &nearestDist) |
Public Attributes | |
| QString | filename |
| time_t | time_loaded = 0 |
| QString | subj |
| QString | surf_name |
| Eigen::Vector3f | eye {1.0f, 0.0f, 0.0f} |
| Eigen::Vector3f | up {0.0f, 0.0f, 1.0f} |
| Eigen::Vector3f | rot = Eigen::Vector3f::Zero() |
| Eigen::Vector3f | move = Eigen::Vector3f::Zero() |
| float | fov = 2.0f |
| float | fov_scale = 1.0f |
| Eigen::Vector3f | minv = Eigen::Vector3f::Constant(-1.0f) |
| Eigen::Vector3f | maxv = Eigen::Vector3f::Constant(1.0f) |
| Eigen::Matrix4f | trans = Eigen::Matrix4f::Identity() |
| int | sketch = 0 |
| std::vector< std::unique_ptr< MNELIB::MNEMorphMap > > | maps |
| int | overlay_type = 0 |
| Eigen::VectorXf | overlay_values |
| int | alt_overlay_type = 0 |
| Eigen::VectorXf | alt_overlay_values |
| Eigen::VectorXf | marker_values |
| Eigen::VectorXf | vertex_colors |
| std::unique_ptr< MNELIB::MNEMshColorScaleDef > | color_scale |
| int | nvertex_colors = 3 |
| Eigen::Vector4f | even_vertex_color = Eigen::Vector4f::Zero() |
| Eigen::VectorXf | marker_colors |
| int | nmarker_colors = 3 |
| Eigen::MatrixXi | marker_tri |
| Eigen::VectorXi | marker_tri_no |
| int | nmarker_tri = 0 |
| Eigen::Vector4f | marker_color = Eigen::Vector4f::Zero() |
| int | curvature_color_mode = 0 |
| int | overlay_color_mode = 0 |
| int | transparent = 0 |
| int | show_aux_data = 0 |
| std::vector< MNELIB::MNEMshPicked > | picked |
| void * | user_data = nullptr |
| mneUserFreeFunc | user_data_free = nullptr |
| Public Attributes inherited from MNELIB::MNESurfaceOrVolume | |
| int | type |
| QString | subject |
| int | id |
| int | coord_frame |
| std::optional< MNEVolGeom > | vol_geom |
| std::optional< MNEMghTagGroup > | mgh_tags |
| int | np |
| PointsT | rr |
| NormalsT | nn |
| float | cm [3] |
| Eigen::VectorXi | inuse |
| Eigen::VectorXi | vertno |
| int | nuse |
| std::vector< Eigen::VectorXi > | neighbor_vert |
| Eigen::VectorXi | nneighbor_vert |
| std::vector< Eigen::VectorXf > | vert_dist |
| float | sigma |
| int | ntri |
| std::vector< MNETriangle > | tris |
| TrianglesT | itris |
| float | tot_area |
| int | nuse_tri |
| std::vector< MNETriangle > | use_tris |
| TrianglesT | use_itris |
| std::vector< Eigen::VectorXi > | neighbor_tri |
| Eigen::VectorXi | nneighbor_tri |
| std::vector< MNENearest > | nearest |
| std::vector< std::optional< MNEPatchInfo > > | patches |
| FIFFLIB::FiffSparseMatrix | dist |
| float | dist_limit |
| Eigen::VectorXf | curv |
| Eigen::VectorXf | val |
| std::optional< FIFFLIB::FiffCoordTrans > | voxel_surf_RAS_t |
| int | vol_dims [3] |
| float | voxel_size [3] |
| std::optional< FIFFLIB::FiffSparseMatrix > | interpolator |
| QString | MRI_volume |
| std::optional< FIFFLIB::FiffCoordTrans > | MRI_voxel_surf_RAS_t |
| std::optional< FIFFLIB::FiffCoordTrans > | MRI_surf_RAS_RAS_t |
| int | MRI_vol_dims [3] |
Additional Inherited Members | |
| Static Public Member Functions inherited from MNELIB::MNESurface | |
| static MNESurface * | read_bem_surface (const QString &name, int which, int add_geometry, float *sigmap) |
| static MNESurface * | read_bem_surface2 (const QString &name, int which, int add_geometry, float *sigmap) |
| static MNESurface * | read_bem_surface (const QString &name, int which, int add_geometry, float *sigmap, bool check_too_many_neighbors) |
| Static Public Member Functions inherited from MNELIB::MNESurfaceOrVolume | |
| static double | solid_angle (const Eigen::Vector3f &from, const MNELIB::MNETriangle &tri) |
| static void | compute_cm (const PointsT &rr, int np, float(&cm)[3]) |
The MNE Msh Display Surface class holds information about a surface to be rendered.
Replaces *mshDisplaySurface, mshDisplaySurfaceRec struct (analyze_types.c).
Definition at line 95 of file mne_msh_display_surface.h.

| typedef QSharedPointer<const MNEMshDisplaySurface> MNELIB::MNEMshDisplaySurface::ConstSPtr |
Const shared pointer type for MNEMshDisplaySurface.
Definition at line 99 of file mne_msh_display_surface.h.
| typedef QSharedPointer<MNEMshDisplaySurface> MNELIB::MNEMshDisplaySurface::SPtr |
Shared pointer type for MNEMshDisplaySurface.
Definition at line 98 of file mne_msh_display_surface.h.
|
default |
Constructs the MNEMshDisplaySurface.
| MNEMshDisplaySurface::~MNEMshDisplaySurface | ( | ) |
Destroys the MNEMshDisplaySurface.
Definition at line 173 of file mne_msh_display_surface.cpp.
| int MNEMshDisplaySurface::align_fiducials | ( | FIFFLIB::FiffDigitizerData & | head_dig, |
| const FIFFLIB::FiffDigitizerData & | mri_dig, | ||
| int | niter, | ||
| int | scale_head, | ||
| float | omit_dist, | ||
| Eigen::Vector3f & | scales ) |
Align MEG and MRI coordinate systems using fiducial points and ICP.
| [in,out] | head_dig | MEG digitizer data (transformed in-place). |
| [in] | mri_dig | MRI digitizer data with fiducial locations. |
| [in] | head_surf | The scalp surface used for ICP. |
| [in] | niter | Number of ICP iterations. |
| [in] | scale_head | If non-zero, scale the head surface to match digitizer. |
| [in] | omit_dist | Discard digitizer points farther than this from the surface (m). |
| [out] | scales | If non-null, receives the per-axis scale factors applied. |
Definition at line 183 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::calculate_digitizer_distances | ( | FIFFLIB::FiffDigitizerData & | dig, |
| int | do_all, | ||
| int | do_approx ) const |
Compute the distance from each active digitizer point to the head surface.
Definition at line 376 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::decide_curv_display | ( | const QString & | name | ) |
Set the curvature display mode based on a surface type name. Inflated, sphere, and white surfaces use overlay mode; others use none.
| [in] | name | Surface type name. |
Definition at line 612 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::decide_surface_extent | ( | const QString & | tag | ) |
Compute and store the axis-aligned bounding box and field-of-view radius by iterating all vertex positions.
| [in] | tag | Surface name tag (used for debug logging). |
Definition at line 585 of file mne_msh_display_surface.cpp.
| int MNEMshDisplaySurface::discard_outlier_digitizer_points | ( | FIFFLIB::FiffDigitizerData & | d, |
| float | maxdist ) const |
Mark digitizer points whose distance to the head surface exceeds maxdist.
Definition at line 346 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::get_head_scale | ( | FIFFLIB::FiffDigitizerData & | dig, |
| const Eigen::Matrix< float, 3, 3, Eigen::RowMajor > & | mri_fid, | ||
| Eigen::Vector3f & | scales ) |
Compute a uniform head scale factor by fitting spheres.
Definition at line 284 of file mne_msh_display_surface.cpp.
| int MNEMshDisplaySurface::iterate_alignment_once | ( | FIFFLIB::FiffDigitizerData & | dig, |
| int | nasion_weight, | ||
| const std::optional< Eigen::Vector3f > & | nasion_mri, | ||
| int | last_step ) const |
Perform one iteration of ICP-like alignment.
Definition at line 461 of file mne_msh_display_surface.cpp.
| float MNEMshDisplaySurface::rms_digitizer_distance | ( | FIFFLIB::FiffDigitizerData & | dig | ) | const |
Compute the RMS distance from active digitizer points to the head surface.
Definition at line 547 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::scale | ( | const Eigen::Vector3f & | scales | ) |
Scale a display surface's bounding box and all vertex positions.
Definition at line 566 of file mne_msh_display_surface.cpp.
| void MNEMshDisplaySurface::setup_curvature_colors | ( | ) |
Allocate and fill per-vertex color arrays using positive/negative curvature colors (if curvature overlay mode is on) or uniform gray.
Definition at line 623 of file mne_msh_display_surface.cpp.
| int MNELIB::MNEMshDisplaySurface::alt_overlay_type = 0 |
Alternative overlay type identifier.
Definition at line 134 of file mne_msh_display_surface.h.
| Eigen::VectorXf MNELIB::MNEMshDisplaySurface::alt_overlay_values |
Per-vertex alternative overlay values.
Definition at line 135 of file mne_msh_display_surface.h.
| std::unique_ptr<MNELIB::MNEMshColorScaleDef> MNELIB::MNEMshDisplaySurface::color_scale |
Color scale used to compute vertex colors.
Definition at line 139 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::curvature_color_mode = 0 |
How curvature is visualized.
Definition at line 149 of file mne_msh_display_surface.h.
| Eigen::Vector4f MNELIB::MNEMshDisplaySurface::even_vertex_color = Eigen::Vector4f::Zero() |
Uniform RGBA color for non-data-driven coloring.
Definition at line 141 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::eye {1.0f, 0.0f, 0.0f} |
Eye position for 3D viewing.
Definition at line 118 of file mne_msh_display_surface.h.
| QString MNELIB::MNEMshDisplaySurface::filename |
Path to the file this surface was loaded from.
Definition at line 114 of file mne_msh_display_surface.h.
| float MNELIB::MNEMshDisplaySurface::fov = 2.0f |
Field of view (extent of the surface).
Definition at line 123 of file mne_msh_display_surface.h.
| float MNELIB::MNEMshDisplaySurface::fov_scale = 1.0f |
Scale factor for extra space around FOV.
Definition at line 124 of file mne_msh_display_surface.h.
| std::vector<std::unique_ptr<MNELIB::MNEMorphMap> > MNELIB::MNEMshDisplaySurface::maps |
Morphing maps from other surfaces to this one.
Definition at line 130 of file mne_msh_display_surface.h.
| Eigen::Vector4f MNELIB::MNEMshDisplaySurface::marker_color = Eigen::Vector4f::Zero() |
RGBA color for markers.
Definition at line 148 of file mne_msh_display_surface.h.
| Eigen::VectorXf MNELIB::MNEMshDisplaySurface::marker_colors |
Per-vertex marker color array.
Definition at line 143 of file mne_msh_display_surface.h.
| Eigen::MatrixXi MNELIB::MNEMshDisplaySurface::marker_tri |
Array of triangles containing markers.
Definition at line 145 of file mne_msh_display_surface.h.
| Eigen::VectorXi MNELIB::MNEMshDisplaySurface::marker_tri_no |
Triangle indices of the marker triangles.
Definition at line 146 of file mne_msh_display_surface.h.
| Eigen::VectorXf MNELIB::MNEMshDisplaySurface::marker_values |
Per-vertex marker values (shown in shades of marker color).
Definition at line 136 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::maxv = Eigen::Vector3f::Constant(1.0f) |
Maximum values along the three coordinate axes.
Definition at line 126 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::minv = Eigen::Vector3f::Constant(-1.0f) |
Minimum values along the three coordinate axes.
Definition at line 125 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::move = Eigen::Vector3f::Zero() |
Translation offset for the origin.
Definition at line 121 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::nmarker_colors = 3 |
Number of color components per marker vertex.
Definition at line 144 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::nmarker_tri = 0 |
Number of marker triangles.
Definition at line 147 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::nvertex_colors = 3 |
Number of color components per vertex.
Definition at line 140 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::overlay_color_mode = 0 |
How overlay data affects coloring.
Definition at line 151 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::overlay_type = 0 |
Type identifier for the overlay values.
Definition at line 132 of file mne_msh_display_surface.h.
| Eigen::VectorXf MNELIB::MNEMshDisplaySurface::overlay_values |
Per-vertex overlay value array.
Definition at line 133 of file mne_msh_display_surface.h.
| std::vector<MNELIB::MNEMshPicked> MNELIB::MNEMshDisplaySurface::picked |
Picked locations in world coordinates.
Definition at line 156 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::rot = Eigen::Vector3f::Zero() |
Rotation angles of the MRI (in radians).
Definition at line 120 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::show_aux_data = 0 |
Non-zero to show auxiliary data related to this surface.
Definition at line 154 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::sketch = 0 |
Non-zero to use sketch mode with decimated triangulation.
Definition at line 128 of file mne_msh_display_surface.h.
| QString MNELIB::MNEMshDisplaySurface::subj |
Subject name in SUBJECTS_DIR.
Definition at line 116 of file mne_msh_display_surface.h.
| QString MNELIB::MNEMshDisplaySurface::surf_name |
Name of the surface (e.g., "inflated", "white").
Definition at line 117 of file mne_msh_display_surface.h.
| time_t MNELIB::MNEMshDisplaySurface::time_loaded = 0 |
Timestamp when the surface was loaded.
Definition at line 115 of file mne_msh_display_surface.h.
| Eigen::Matrix4f MNELIB::MNEMshDisplaySurface::trans = Eigen::Matrix4f::Identity() |
Extra 4x4 transformation matrix for this surface.
Definition at line 127 of file mne_msh_display_surface.h.
| int MNELIB::MNEMshDisplaySurface::transparent = 0 |
Non-zero if this surface is rendered transparently.
Definition at line 152 of file mne_msh_display_surface.h.
| Eigen::Vector3f MNELIB::MNEMshDisplaySurface::up {0.0f, 0.0f, 1.0f} |
Up vector for 3D viewing.
Definition at line 119 of file mne_msh_display_surface.h.
| void* MNELIB::MNEMshDisplaySurface::user_data = nullptr |
Arbitrary user-defined data pointer.
Definition at line 158 of file mne_msh_display_surface.h.
| mneUserFreeFunc MNELIB::MNEMshDisplaySurface::user_data_free = nullptr |
Function to free user_data.
Definition at line 159 of file mne_msh_display_surface.h.
| Eigen::VectorXf MNELIB::MNEMshDisplaySurface::vertex_colors |
Per-vertex RGBA color array.
Definition at line 138 of file mne_msh_display_surface.h.