OpenMEEG
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenMEEG::Sensors Class Reference

#include <sensors.h>

Collaboration diagram for OpenMEEG::Sensors:
Collaboration graph
[legend]

Public Member Functions

 Sensors (const char *filename, const Geometry &g)
 
 Sensors (const Strings &labels, const Matrix &positions, const Matrix &orientations, const Vector &weights, const Vector &radii)
 
 Sensors (const Strings &labels, const Matrix &positions, const Matrix &orientations, const Vector &weights, const Vector &radii, const Geometry &g)
 
void load (const char *filename, char filetype='t')
 
void load (std::istream &in)
 
void save (const char *filename)
 
Vector getPosition (size_t idx) const
 
Vector getOrientation (size_t idx) const
 
void setPosition (size_t idx, Vector &pos)
 
void setOrientation (size_t idx, Vector &orient)
 
bool hasSensor (std::string name) const
 
size_t getSensorIdx (std::string name) const
 
Vector getRadii () const
 
Vector getWeights () const
 
SparseMatrix getWeightsMatrix () const
 
void info () const
 get info about sensors. More...
 

Private Member Functions

void findInjectionTriangles ()
 

Private Attributes

size_t m_nb
 
Strings m_names
 
Matrix m_positions
 
Matrix m_orientations
 
Vector m_weights
 
Vector m_radii
 
std::vector< Trianglesm_triangles
 
const Geometrym_geo
 
std::vector< size_t > m_pointSensorIdx
 

Detailed Description

Sensors class for EEG and MEG sensors. This class is made for reading sensors description file. This description file is a file text. Sensors may have names (labels) in the first column of the file (it has to contains at least one character to be considered as label) the file can have the shape of (neglecting if present the first, label column):

Definition at line 92 of file sensors.h.

Constructor & Destructor Documentation

◆ Sensors() [1/3]

OpenMEEG::Sensors::Sensors ( const char *  filename,
const Geometry g 
)
inline

Definition at line 98 of file sensors.h.

◆ Sensors() [2/3]

OpenMEEG::Sensors::Sensors ( const Strings labels,
const Matrix positions,
const Matrix orientations,
const Vector weights,
const Vector radii 
)
inline

Construct from file and geometry (for EIT).

Definition at line 169 of file sensors.h.

◆ Sensors() [3/3]

OpenMEEG::Sensors::Sensors ( const Strings labels,
const Matrix positions,
const Matrix orientations,
const Vector weights,
const Vector radii,
const Geometry g 
)
inline

Definition at line 179 of file sensors.h.

Member Function Documentation

◆ load() [1/2]

void OpenMEEG::Sensors::load ( const char *  filename,
char  filetype = 't' 
)

Load sensors from file. Filetype is 't' for text file or 'b' for binary file.

◆ load() [2/2]

void OpenMEEG::Sensors::load ( std::istream &  in)

Load description file of sensors from stream.

◆ save()

void OpenMEEG::Sensors::save ( const char *  filename)

◆ getPosition()

Vector OpenMEEG::Sensors::getPosition ( size_t  idx) const
inline

Return the position (3D point) of the integration point i.

Definition at line 153 of file sensors.h.

◆ getOrientation()

Vector OpenMEEG::Sensors::getOrientation ( size_t  idx) const
inline

Return the orientations (3D point) of the integration point i.

Definition at line 157 of file sensors.h.

◆ setPosition()

void OpenMEEG::Sensors::setPosition ( size_t  idx,
Vector pos 
)
inline

Set the position (3D point) of the integration point i.

Definition at line 161 of file sensors.h.

◆ setOrientation()

void OpenMEEG::Sensors::setOrientation ( size_t  idx,
Vector orient 
)
inline

Set the orientation (3D point) of the integration point i.

Definition at line 165 of file sensors.h.

◆ hasSensor()

bool OpenMEEG::Sensors::hasSensor ( std::string  name) const

◆ getSensorIdx()

size_t OpenMEEG::Sensors::getSensorIdx ( std::string  name) const

◆ getRadii()

Vector OpenMEEG::Sensors::getRadii ( ) const
inline

Definition at line 132 of file sensors.h.

◆ getWeights()

Vector OpenMEEG::Sensors::getWeights ( ) const
inline

Definition at line 133 of file sensors.h.

◆ getWeightsMatrix()

SparseMatrix OpenMEEG::Sensors::getWeightsMatrix ( ) const

◆ info()

void OpenMEEG::Sensors::info ( ) const

get info about sensors.

◆ findInjectionTriangles()

void OpenMEEG::Sensors::findInjectionTriangles ( )
private

Get the triangles under each EIT sensors

Member Data Documentation

◆ m_nb

size_t OpenMEEG::Sensors::m_nb
private

Number of sensors.

Definition at line 141 of file sensors.h.

◆ m_names

Strings OpenMEEG::Sensors::m_names
private

List of sensors names.

Definition at line 142 of file sensors.h.

◆ m_positions

Matrix OpenMEEG::Sensors::m_positions
private

Matrix of sensors positions. ex: positions(i,j) with j in {0,1,2} for sensor i

Definition at line 143 of file sensors.h.

◆ m_orientations

Matrix OpenMEEG::Sensors::m_orientations
private

Matrix of sensors orientations. ex: orientation(i,j) with j in {0,1,2} for sensor i

Definition at line 144 of file sensors.h.

◆ m_weights

Vector OpenMEEG::Sensors::m_weights
private

Weights of integration points

Definition at line 145 of file sensors.h.

◆ m_radii

Vector OpenMEEG::Sensors::m_radii
private

Areas of the EIT sensors

Definition at line 146 of file sensors.h.

◆ m_triangles

std::vector<Triangles> OpenMEEG::Sensors::m_triangles
private

Triangles under each EIT sensors

Definition at line 147 of file sensors.h.

◆ m_geo

const Geometry* OpenMEEG::Sensors::m_geo
private

Geometry on which are applied EIT sensors

Definition at line 148 of file sensors.h.

◆ m_pointSensorIdx

std::vector<size_t> OpenMEEG::Sensors::m_pointSensorIdx
private

Correspondance between point id and sensor id

Definition at line 149 of file sensors.h.


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