MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
DISP3DLIB::GeometryInfo Class Reference

This class holds static methods for sensor-to-mesh mapping and surface constrained distance calculation on a mesh. More...

#include <geometryinfo.h>

Public Types

typedef QSharedPointer< GeometryInfoSPtr
 
typedef QSharedPointer< const GeometryInfoConstSPtr
 

Public Member Functions

 GeometryInfo ()=delete
 

Static Public Member Functions

static QSharedPointer< Eigen::MatrixXd > scdc (const Eigen::MatrixX3f &matVertices, const QVector< QVector< int > > &vecNeighborVertices, QVector< int > &pVecVertSubset, double dCancelDist=FLOAT_INFINITY)
 scdc Calculates surface constrained distances on a mesh. More...
 
static QVector< int > projectSensors (const Eigen::MatrixX3f &matVertices, const QVector< Eigen::Vector3f > &vecSensorPositions)
 Calculates the nearest neighbor (euclidian distance) vertex to each sensor. More...
 
static QVector< int > filterBadChannels (QSharedPointer< Eigen::MatrixXd > matDistanceTable, const FIFFLIB::FiffInfo &fiffInfo, qint32 iSensorType)
 filterBadChannels Filters bad channels from distance table More...
 

Static Protected Member Functions

static double squared (double dBase)
 squared Implemented for better readability only More...
 
static QVector< int > nearestNeighbor (const Eigen::MatrixX3f &matVertices, QVector< Eigen::Vector3f >::const_iterator itSensorBegin, QVector< Eigen::Vector3f >::const_iterator itSensorEnd)
 nearestNeighbor Calculates the nearest vertex of an MNEmatVertices for each position between the two iterators More...
 
static void iterativeDijkstra (QSharedPointer< Eigen::MatrixXd > matOutputDistMatrix, const Eigen::MatrixX3f &matVertices, const QVector< QVector< int > > &vecNeighborVertices, const QVector< int > &vecVertSubset, qint32 iBegin, qint32 iEnd, double dCancelDistance)
 iterativeDijkstra Calculates shortest distances on the mesh that is held by the MNEmatVertices for each vertex of the passed vector that lies between the two indices More...
 

Detailed Description

This class holds static methods for sensor-to-mesh mapping and surface constrained distance calculation on a mesh.

This class allows sensor-to-mesh mapping and calculation of surface constrained distances. Given the positions of a row of sensors in 3D space, it finds the best fitting vertex of an underlying mesh. This can be used for later signal interpolation (see class Interpolation for more details). Given a mesh, the class can calculate shortest path on said mesh. It outputs a distance table.

Definition at line 95 of file geometryinfo.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const GeometryInfo> DISP3DLIB::GeometryInfo::ConstSPtr

Const shared pointer type for GeometryInfo.

Definition at line 100 of file geometryinfo.h.

◆ SPtr

Shared pointer type for GeometryInfo.

Definition at line 99 of file geometryinfo.h.

Constructor & Destructor Documentation

◆ GeometryInfo()

DISP3DLIB::GeometryInfo::GeometryInfo ( )
delete

deleted default constructor (static class).

Member Function Documentation

◆ filterBadChannels()

QVector< int > GeometryInfo::filterBadChannels ( QSharedPointer< Eigen::MatrixXd >  matDistanceTable,
const FIFFLIB::FiffInfo fiffInfo,
qint32  iSensorType 
)
static

filterBadChannels Filters bad channels from distance table

Parameters
[out]matDistanceTableResult of SCDC.
[in]fiffInfoContainer for sensors.
[in]iSensorTypeSensor type to be filtered out, use fiff constants.
Returns
Vector of bad channel indices.

Definition at line 314 of file geometryinfo.cpp.

◆ iterativeDijkstra()

void GeometryInfo::iterativeDijkstra ( QSharedPointer< Eigen::MatrixXd >  matOutputDistMatrix,
const Eigen::MatrixX3f &  matVertices,
const QVector< QVector< int > > &  vecNeighborVertices,
const QVector< int > &  vecVertSubset,
qint32  iBegin,
qint32  iEnd,
double  dCancelDistance 
)
staticprotected

iterativeDijkstra Calculates shortest distances on the mesh that is held by the MNEmatVertices for each vertex of the passed vector that lies between the two indices

Parameters
[out]matOutputDistMatrixThe matrix in which the distances will be stored.
[in]matVerticesThe surface on which distances should be calculated.
[in]vecNeighborVerticesThe neighbor vertex information.
[in]vecVertSubsetThe subset of vertices.
[in]iBeginStart index of distance calculation.
[in]iEndEnd index of distance calculation, exclusive.
[in]dCancelDistanceDistance threshold: all vertices that have a higher distance to the respective root vertex are set to infinity.

Definition at line 248 of file geometryinfo.cpp.

◆ nearestNeighbor()

QVector< int > GeometryInfo::nearestNeighbor ( const Eigen::MatrixX3f &  matVertices,
QVector< Eigen::Vector3f >::const_iterator  itSensorBegin,
QVector< Eigen::Vector3f >::const_iterator  itSensorEnd 
)
staticprotected

nearestNeighbor Calculates the nearest vertex of an MNEmatVertices for each position between the two iterators

Parameters
[in]matVerticesThe MNEmatVertices that holds the vertex information.
[in]itSensorBeginThe iterator that indicates the start of the wanted section of positions.
[in]itSensorEndThe iterator that indicates the end of the wanted section of positions.
Returns
A vector of nearest vertex IDs that corresponds to the subvector between the two iterators.

Definition at line 215 of file geometryinfo.cpp.

◆ projectSensors()

QVector< int > GeometryInfo::projectSensors ( const Eigen::MatrixX3f &  matVertices,
const QVector< Eigen::Vector3f > &  vecSensorPositions 
)
static

Calculates the nearest neighbor (euclidian distance) vertex to each sensor.

Parameters
[in]matVerticesHolds all vertex information that is needed.
[in]vecSensorPositionsEach sensor postion in saved in an Eigen vector with x, y & z coord.
Returns
Output vector where the vector index position represents the id of the sensor. and the int in each cell is the vertex it is mapped to

Definition at line 150 of file geometryinfo.cpp.

◆ scdc()

QSharedPointer< MatrixXd > GeometryInfo::scdc ( const Eigen::MatrixX3f &  matVertices,
const QVector< QVector< int > > &  vecNeighborVertices,
QVector< int > &  pVecVertSubset,
double  dCancelDist = FLOAT_INFINITY 
)
static

scdc Calculates surface constrained distances on a mesh.

Parameters
[in]matVerticesThe surface on which distances should be calculated.
[in]vecNeighborVerticesThe neighbor vertex information.
[in/out]pVecVertSubset The subset of IDs for which the distances should be calculated.
[in]dCancelDistDistances higher than this are ignored, i.e. set to infinity.
Returns
A double matrix. One column represents the distances for one vertex inside of the passed subset.

Definition at line 78 of file geometryinfo.cpp.

◆ squared()

double DISP3DLIB::GeometryInfo::squared ( double  dBase)
inlinestaticprotected

squared Implemented for better readability only

Parameters
[in]dBaseBase double value.
Returns
Base squared.

Definition at line 201 of file geometryinfo.h.


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