20#ifndef MNESURFACEORVOLUME_H
21#define MNESURFACEORVOLUME_H
47#include <QSharedPointer>
57#define FIFF_MNE_SOURCE_SPACE_NNEIGHBORS 3594
58#define FIFF_MNE_SOURCE_SPACE_NEIGHBORS 3595
60#define FIFFV_MNE_COORD_SURFACE_RAS FIFFV_COORD_MRI
62#define TRIANGLE_FILE_MAGIC_NUMBER (0xfffffe)
63#define NEW_QUAD_FILE_MAGIC_NUMBER (0xfffffd)
64#define QUAD_FILE_MAGIC_NUMBER (0xffffff)
66#define TAG_OLD_SURF_GEOM 20
73 class FiffDigitizerData;
104 typedef QSharedPointer<MNESurfaceOrVolume>
SPtr;
105 typedef QSharedPointer<const MNESurfaceOrVolume>
ConstSPtr;
111 typedef Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>
PointsT;
112 typedef Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>
NormalsT;
113 typedef Eigen::Matrix<int, Eigen::Dynamic, 3, Eigen::RowMajor>
TrianglesT;
141 static double solid_angle (
const Eigen::Vector3f& from,
255 void setNearestData(
const Eigen::VectorXi& nearestIdx,
const Eigen::VectorXd& nearestDist);
277 Eigen::Map<const Eigen::Vector3f>
point(
int k)
const {
return Eigen::Map<const Eigen::Vector3f>(
rr.row(k).data()); }
279 Eigen::Map<Eigen::Vector3f>
point(
int k) {
return Eigen::Map<Eigen::Vector3f>(
rr.row(k).data()); }
281 Eigen::Map<const Eigen::Vector3f>
normal(
int k)
const {
return Eigen::Map<const Eigen::Vector3f>(
nn.row(k).data()); }
308 std::vector<std::optional<MNEPatchInfo>>
patches;
FreeSurfer volume geometry header carried by surface and tag streams.
Ordered group of MNELIB::MNEMghTag entries appended to an MGH/MGZ file.
MNELIB shared-library export/import macros and library build metadata.
Legacy MNE-C constants and shared typedefs used across MNELIB structures.
Patch information (cluster of cortex vertices around each decimated source) used by orientation prior...
Triangle descriptor with cached centroid, area and normal vectors.
Per-source-space-vertex nearest-cortex-vertex mapping.
FIFF sparse matrix: column / row-compressed sparse storage backed by Eigen::SparseMatrix.
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O, in-memory data structures and high-level readers/writers.
Sparse FIFF matrix: CCS or RCS storage with the value / index / pointer triple as written by FiffStre...
Thread-local arguments for parallel raw data filtering (channel range, filter kernel,...
The MNE Msh Display FsSurface class holds information about a surface to be rendered.
Auxiliary projection data computed from MNEProjOp for efficient repeated application.
This defines a source space.
Lightweight triangulated surface (vertices, triangles, normals).
std::vector< Eigen::VectorXi > neighbor_tri
MNESurfaceOrVolume(MNESurfaceOrVolume &&)=default
void setNearestData(const Eigen::VectorXi &nearestIdx, const Eigen::VectorXd &nearestDist)
std::vector< Eigen::VectorXi > neighbor_vert
MNESurfaceOrVolume()
Constructs the MNE FsSurface or Volume.
std::optional< FIFFLIB::FiffCoordTrans > MRI_surf_RAS_RAS_t
Eigen::Map< const Eigen::Vector3f > normal(int k) const
QSharedPointer< const MNESurfaceOrVolume > ConstSPtr
Eigen::VectorXd nearestDistVec() const
int add_geometry_info(bool do_normals, bool check_too_many_neighbors)
FIFFLIB::FiffSparseMatrix dist
std::vector< MNENearest > nearest
MNESurfaceOrVolume & operator=(MNESurfaceOrVolume &&)=default
Eigen::VectorXi nneighbor_vert
QSharedPointer< MNESurfaceOrVolume > SPtr
Eigen::VectorXi nneighbor_tri
void calculate_vertex_distances()
static void compute_cm(const PointsT &rr, int np, float(&cm)[3])
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > NormalsT
std::optional< FIFFLIB::FiffSparseMatrix > interpolator
static double solid_angle(const Eigen::Vector3f &from, const MNELIB::MNETriangle &tri)
Eigen::Matrix< int, Eigen::Dynamic, 3, Eigen::RowMajor > TrianglesT
MNESurfaceOrVolume(const MNESurfaceOrVolume &)=default
std::optional< MNEVolGeom > vol_geom
std::vector< std::optional< MNEPatchInfo > > patches
void compute_surface_cm()
std::optional< FIFFLIB::FiffCoordTrans > MRI_voxel_surf_RAS_t
MNESurfaceOrVolume & operator=(const MNESurfaceOrVolume &)=default
std::vector< MNETriangle > tris
std::optional< MNEMghTagGroup > mgh_tags
std::optional< FIFFLIB::FiffCoordTrans > voxel_surf_RAS_t
std::vector< Eigen::VectorXf > vert_dist
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > PointsT
Eigen::Map< const Eigen::Vector3f > point(int k) const
int add_geometry_info2(bool do_normals)
Eigen::VectorXi nearestVertIdx() const
Eigen::Map< Eigen::Vector3f > point(int k)
std::vector< MNETriangle > use_tris
Per-triangle geometric data for a cortical or BEM surface.