37#ifndef MNESURFACEORVOLUME_H
38#define MNESURFACEORVOLUME_H
64#include <QSharedPointer>
74#define FIFF_MNE_SOURCE_SPACE_NNEIGHBORS 3594
75#define FIFF_MNE_SOURCE_SPACE_NEIGHBORS 3595
77#define FIFFV_MNE_COORD_SURFACE_RAS FIFFV_COORD_MRI
79#define TRIANGLE_FILE_MAGIC_NUMBER (0xfffffe)
80#define NEW_QUAD_FILE_MAGIC_NUMBER (0xfffffd)
81#define QUAD_FILE_MAGIC_NUMBER (0xffffff)
83#define TAG_OLD_SURF_GEOM 20
90 class FiffDigitizerData;
121 typedef QSharedPointer<MNESurfaceOrVolume>
SPtr;
122 typedef QSharedPointer<const MNESurfaceOrVolume>
ConstSPtr;
128 typedef Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>
PointsT;
129 typedef Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>
NormalsT;
130 typedef Eigen::Matrix<int, Eigen::Dynamic, 3, Eigen::RowMajor>
TrianglesT;
158 static double solid_angle (
const Eigen::Vector3f& from,
272 void setNearestData(
const Eigen::VectorXi& nearestIdx,
const Eigen::VectorXd& nearestDist);
294 Eigen::Map<const Eigen::Vector3f>
point(
int k)
const {
return Eigen::Map<const Eigen::Vector3f>(
rr.row(k).data()); }
296 Eigen::Map<Eigen::Vector3f>
point(
int k) {
return Eigen::Map<Eigen::Vector3f>(
rr.row(k).data()); }
298 Eigen::Map<const Eigen::Vector3f>
normal(
int k)
const {
return Eigen::Map<const Eigen::Vector3f>(
nn.row(k).data()); }
325 std::vector<std::optional<MNEPatchInfo>>
patches;
FiffCoordTrans class declaration.
FiffSparseMatrix class declaration.
Legacy MNE-C constants and common typedefs.
mne library export/import macros.
MNE Patch Information (MNEPatchInfo) class declaration.
MNENearest class declaration.
MNEMghTagGroup class declaration.
MNETriangle class declaration.
MNEVolGeom class declaration.
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
FIFF sparse matrix storage backed by Eigen.
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.
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.