25#ifndef MNE_HEMISPHERE_H
26#define MNE_HEMISPHERE_H
44#include <Eigen/SparseCore>
75 using SPtr = std::shared_ptr<MNEHemisphere>;
76 using ConstSPtr = std::shared_ptr<const MNEHemisphere>;
236 for (
int i = 0; i < a.
pinfo.size(); ++i) {
248 const auto& sa = a.dist.eigen();
249 const auto& sb = b.dist.eigen();
250 if (sa.rows() == 0 && sb.rows() == 0 && sa.cols() == 0 && sb.cols() == 0)
252 return sa.toDense().isApprox(sb.toDense(), 0.0001f);
255 if (a.neighbor_tri.size() != b.neighbor_tri.size())
257 for (size_t i = 0; i < a.neighbor_tri.size(); ++i) {
258 if (a.neighbor_tri[i].size() != b.neighbor_tri[i].size())
260 if (a.neighbor_tri[i].size() > 0 && !(a.neighbor_tri[i].array() == b.neighbor_tri[i].array()).all())
266 if (a.neighbor_vert.size() != b.neighbor_vert.size())
268 for (
size_t i = 0; i < a.neighbor_vert.size(); ++i) {
269 if (a.neighbor_vert[i].size() != b.neighbor_vert[i].size())
271 if (a.neighbor_vert[i].size() > 0 && !(a.neighbor_vert[i].array() == b.neighbor_vert[i].array()).all())
276 a.cluster_info == b.cluster_info);
Static MATLAB-style FIFF facade: thin wrapper functions kept for parity with the historical mne-matla...
Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system.
Bookkeeping for a label-restricted clustering of source-space leadfield columns.
Single-hemisphere source space (cortical surface or volume grid) loaded from FIFF.
MNELIB shared-library export/import macros and library build metadata.
Core MNE data structures (source spaces, source estimates, hemispheres).
bool operator==(const MNEClusterInfo &a, const MNEClusterInfo &b)
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
FIFF tag-stream reader/writer: wraps a QIODevice and exposes typed read_* / write_* methods for every...
Cluster table used to compress and reconstruct a clustered leadfield.
void writeToStream(FIFFLIB::FiffStream *p_pStream)
Eigen::MatrixX3d tri_cent
bool complete_source_space_info()
Eigen::VectorXd use_tri_area
Eigen::MatrixX3d use_tri_cent
friend bool operator==(const MNEHemisphere &a, const MNEHemisphere &b)
MNEHemisphere & operator=(const MNEHemisphere &other)
bool compute_patch_info()
MNESourceSpace::SPtr clone() const override
bool transform_hemisphere_to(FIFFLIB::fiff_int_t dest, const FIFFLIB::FiffCoordTrans &p_Trans)
MNEClusterInfo cluster_info
Eigen::MatrixX3d use_tri_nn
std::shared_ptr< const MNEHemisphere > ConstSPtr
QList< Eigen::VectorXi > pinfo
std::shared_ptr< MNEHemisphere > SPtr
Eigen::VectorXi patch_inds
std::shared_ptr< MNESourceSpace > SPtr
Eigen::VectorXd nearestDistVec() const
Eigen::VectorXi nearestVertIdx() const