v2.0.0
Loading...
Searching...
No Matches
MNELIB::MNEHemisphere Class Reference

Hemisphere provides geometry information. More...

#include <mne_hemisphere.h>

Public Types

using SPtr = std::shared_ptr<MNEHemisphere>
using ConstSPtr = std::shared_ptr<const MNEHemisphere>
Public Types inherited from MNELIB::MNESourceSpace
using SPtr = std::shared_ptr<MNESourceSpace>
using ConstSPtr = std::shared_ptr<const MNESourceSpace>
Public Types inherited from MNELIB::MNESurfaceOrVolume
typedef QSharedPointer< MNESurfaceOrVolumeSPtr
typedef QSharedPointer< const MNESurfaceOrVolumeConstSPtr
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

 MNEHemisphere ()
 MNEHemisphere (const MNEHemisphere &p_MNEHemisphere)
 ~MNEHemisphere () override
MNESourceSpace::SPtr clone () const override
bool add_geometry_info ()
bool complete_source_space_info ()
bool compute_patch_info ()
void clear ()
Eigen::MatrixXf & getTriCoords (float p_fScaling=1.0f)
bool isClustered () const
bool transform_hemisphere_to (FIFFLIB::fiff_int_t dest, const FIFFLIB::FiffCoordTrans &p_Trans)
void writeToStream (FIFFLIB::FiffStream *p_pStream)
MNEHemisphereoperator= (const MNEHemisphere &other)
Public Member Functions inherited from MNELIB::MNESourceSpace
 MNESourceSpace (int np=0)
 ~MNESourceSpace () override
void enable_all_sources ()
int is_left_hemi () const
qint32 find_source_space_hemi () const
void update_inuse (Eigen::VectorXi new_inuse)
int transform_source_space (const FIFFLIB::FiffCoordTrans &t)
int add_patch_stats ()
void rearrange_source_space ()
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
MNESurfaceOrVolumeoperator= (const MNESurfaceOrVolume &)=default
 MNESurfaceOrVolume (MNESurfaceOrVolume &&)=default
MNESurfaceOrVolumeoperator= (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

QList< Eigen::VectorXi > pinfo
Eigen::VectorXi patch_inds
Eigen::MatrixX3d tri_cent
Eigen::MatrixX3d tri_nn
Eigen::VectorXd tri_area
Eigen::MatrixX3d use_tri_cent
Eigen::MatrixX3d use_tri_nn
Eigen::VectorXd use_tri_area
MNEClusterInfo cluster_info
Public Attributes inherited from MNELIB::MNESurfaceOrVolume
int type
QString subject
int id
int coord_frame
std::optional< MNEVolGeomvol_geom
std::optional< MNEMghTagGroupmgh_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< MNETriangletris
TrianglesT itris
float tot_area
int nuse_tri
std::vector< MNETriangleuse_tris
TrianglesT use_itris
std::vector< Eigen::VectorXi > neighbor_tri
Eigen::VectorXi nneighbor_tri
std::vector< MNENearestnearest
std::vector< std::optional< MNEPatchInfo > > patches
FIFFLIB::FiffSparseMatrix dist
float dist_limit
Eigen::VectorXf curv
Eigen::VectorXf val
std::optional< FIFFLIB::FiffCoordTransvoxel_surf_RAS_t
int vol_dims [3]
float voxel_size [3]
std::optional< FIFFLIB::FiffSparseMatrixinterpolator
QString MRI_volume
std::optional< FIFFLIB::FiffCoordTransMRI_voxel_surf_RAS_t
std::optional< FIFFLIB::FiffCoordTransMRI_surf_RAS_RAS_t
int MRI_vol_dims [3]

Friends

bool operator== (const MNEHemisphere &a, const MNEHemisphere &b)

Additional Inherited Members

Static Public Member Functions inherited from MNELIB::MNESourceSpace
static std::unique_ptr< MNESourceSpacecreate_source_space (int np)
static std::unique_ptr< MNESourceSpaceload_surface (const QString &surf_file, const QString &curv_file)
static std::unique_ptr< MNESourceSpaceload_surface_geom (const QString &surf_file, const QString &curv_file, int add_geometry, int check_too_many_neighbors)
static MNESourceSpacemake_volume_source_space (const MNESurface &surf, float grid, float exclude, float mindist)
static int filter_source_spaces (const MNESurface &surf, float limit, const FIFFLIB::FiffCoordTrans &mri_head_t, std::vector< std::unique_ptr< MNESourceSpace > > &spaces, QTextStream *filtered)
static void filter_source_space (FilterThreadArg *arg)
static int filter_source_spaces (float limit, const QString &bemfile, const FIFFLIB::FiffCoordTrans &mri_head_t, std::vector< std::unique_ptr< MNESourceSpace > > &spaces, QTextStream *filtered, bool use_threads)
static int read_source_spaces (const QString &name, std::vector< std::unique_ptr< MNESourceSpace > > &spaces)
static int transform_source_spaces_to (int coord_frame, const FIFFLIB::FiffCoordTrans &t, std::vector< std::unique_ptr< MNESourceSpace > > &spaces)
static int restrict_sources_to_labels (std::vector< std::unique_ptr< MNESourceSpace > > &spaces, const QStringList &labels, int nlabel)
static int read_label (const QString &label, Eigen::VectorXi &sel)
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])

Detailed Description

Hemisphere provides geometry information.

Hemisphere source space geometry information

Definition at line 82 of file mne_hemisphere.h.

Inheritance diagram for MNELIB::MNEHemisphere:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

using MNELIB::MNEHemisphere::ConstSPtr = std::shared_ptr<const MNEHemisphere>

Const shared pointer type for MNEHemisphere.

Definition at line 86 of file mne_hemisphere.h.

◆ SPtr

using MNELIB::MNEHemisphere::SPtr = std::shared_ptr<MNEHemisphere>

Shared pointer type for MNEHemisphere.

Definition at line 85 of file mne_hemisphere.h.

Constructor & Destructor Documentation

◆ MNEHemisphere() [1/2]

MNEHemisphere::MNEHemisphere ( )

Constructors the hemisphere source space.

Definition at line 61 of file mne_hemisphere.cpp.

◆ MNEHemisphere() [2/2]

MNEHemisphere::MNEHemisphere ( const MNEHemisphere & p_MNEHemisphere)

Copy constructor.

Parameters
[in]p_MNEHemisphereHemisphere source space which should be copied.

Definition at line 86 of file mne_hemisphere.cpp.

◆ ~MNEHemisphere()

MNEHemisphere::~MNEHemisphere ( )
override

Destroys the hemisphere source space.

Definition at line 166 of file mne_hemisphere.cpp.

Member Function Documentation

◆ add_geometry_info()

bool MNEHemisphere::add_geometry_info ( )

Add vertex normals and neighbourhood information

Parameters
[in,out]p_pHemisphereHemisphere to be completed.
Returns
true if succeeded, false otherwise.

Definition at line 351 of file mne_hemisphere.cpp.

◆ clear()

void MNEHemisphere::clear ( )

Initializes the hemisphere source space.

Definition at line 407 of file mne_hemisphere.cpp.

◆ clone()

MNESourceSpace::SPtr MNEHemisphere::clone ( ) const
overridevirtual

Creates a deep copy of this hemisphere, preserving the MNEHemisphere type.

Returns
a shared_ptr<MNESourceSpace> pointing to a cloned MNEHemisphere.

Reimplemented from MNELIB::MNESourceSpace.

Definition at line 172 of file mne_hemisphere.cpp.

◆ complete_source_space_info()

bool MNEHemisphere::complete_source_space_info ( )

Complete triangulation information (triangle centers, normals, areas) for both the main and use triangulations.

Returns
true if succeeded, false otherwise.

Definition at line 179 of file mne_hemisphere.cpp.

◆ compute_patch_info()

bool MNEHemisphere::compute_patch_info ( )

Compute patch statistics from the nearest-vertex data. Fills pinfo (per-patch vertex lists) and patch_inds (patch index per vertex).

Returns
true if patch info was computed, false if nearest data is empty.

Definition at line 278 of file mne_hemisphere.cpp.

◆ getTriCoords()

MatrixXf & MNEHemisphere::getTriCoords ( float p_fScaling = 1.0f)

Qt 3d geometry information. Data are generated within first call.

Parameters
[in]p_fScalingScale factor of the returned geometry tri model.
Returns
the geometry model.

Definition at line 448 of file mne_hemisphere.cpp.

◆ isClustered()

bool MNELIB::MNEHemisphere::isClustered ( ) const
inline

is hemisphere clustered?

Returns
true if hemisphere is clustered, false otherwise.

Definition at line 250 of file mne_hemisphere.h.

◆ operator=()

MNEHemisphere & MNEHemisphere::operator= ( const MNEHemisphere & other)

Copy assignment operator.

Parameters
[in]otherThe MNEHemisphere to assign from.
Returns
Reference to this object.

Definition at line 122 of file mne_hemisphere.cpp.

◆ transform_hemisphere_to()

bool MNEHemisphere::transform_hemisphere_to ( FIFFLIB::fiff_int_t dest,
const FIFFLIB::FiffCoordTrans & p_Trans )

mne_transform_source_space_to

MNE toolbox root function

Definition of the mne_transform_source_space_to for a single hemisphere function Transform source space data to the desired coordinate system.

Parameters
[in]destThe id of the destination coordinate system (FIFFV_COORD_...).
[in]p_TransThe coordinate transformation structure to use.
Returns
true if succeeded, false otherwise.

Definition at line 468 of file mne_hemisphere.cpp.

◆ writeToStream()

void MNEHemisphere::writeToStream ( FIFFLIB::FiffStream * p_pStream)

mne_python _write_one_source_space

MNE toolbox root function

Write the hemisphere to a FIF stream

Parameters
[in]p_pStreamThe stream to write to.

Definition at line 502 of file mne_hemisphere.cpp.

◆ operator==

bool operator== ( const MNEHemisphere & a,
const MNEHemisphere & b )
friend

Overloaded == operator to compare an object to this instance.

Parameters
[in]objectThe object which should be compared to.
Returns
true if equal, false otherwise.

Definition at line 257 of file mne_hemisphere.h.

Member Data Documentation

◆ cluster_info

MNEClusterInfo MNELIB::MNEHemisphere::cluster_info

Holds the cluster information.

Definition at line 240 of file mne_hemisphere.h.

◆ patch_inds

Eigen::VectorXi MNELIB::MNEHemisphere::patch_inds

List of neighboring vertices in the high resolution triangulation.

Definition at line 230 of file mne_hemisphere.h.

◆ pinfo

QList<Eigen::VectorXi> MNELIB::MNEHemisphere::pinfo

Patch information (using option -cps during mne_setup_source_space).

Definition at line 229 of file mne_hemisphere.h.

◆ tri_area

Eigen::VectorXd MNELIB::MNEHemisphere::tri_area

Triangle areas.

Definition at line 235 of file mne_hemisphere.h.

◆ tri_cent

Eigen::MatrixX3d MNELIB::MNEHemisphere::tri_cent

Triangle centers.

Definition at line 233 of file mne_hemisphere.h.

◆ tri_nn

Eigen::MatrixX3d MNELIB::MNEHemisphere::tri_nn

Triangle normals.

Definition at line 234 of file mne_hemisphere.h.

◆ use_tri_area

Eigen::VectorXd MNELIB::MNEHemisphere::use_tri_area

Triangle areas of used triangles.

Definition at line 238 of file mne_hemisphere.h.

◆ use_tri_cent

Eigen::MatrixX3d MNELIB::MNEHemisphere::use_tri_cent

Triangle centers of used triangles.

Definition at line 236 of file mne_hemisphere.h.

◆ use_tri_nn

Eigen::MatrixX3d MNELIB::MNEHemisphere::use_tri_nn

Triangle normals of used triangles.

Definition at line 237 of file mne_hemisphere.h.


The documentation for this class was generated from the following files: