MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
FWDLIB::FwdEegSphereModel Class Reference

Electric Current Dipole description. More...

#include <fwd_eeg_sphere_model.h>

Public Types

typedef QSharedPointer< FwdEegSphereModelSPtr
 
typedef QSharedPointer< const FwdEegSphereModelConstSPtr
 

Public Member Functions

 FwdEegSphereModel ()
 
 FwdEegSphereModel (const FwdEegSphereModel &p_FwdEegSphereModel)
 
virtual ~FwdEegSphereModel ()
 
double fwd_eeg_get_multi_sphere_model_coeff (int n)
 
bool fwd_setup_eeg_sphere_model (float rad, bool fit_berg_scherg, int nfit)
 
bool fwd_eeg_fit_berg_scherg (int nterms, int nfit, float &rv)
 
int nlayer () const
 

Static Public Member Functions

static FwdEegSphereModelfwd_create_eeg_sphere_model (const QString &name, int nlayer, const Eigen::VectorXf &rads, const Eigen::VectorXf &sigmas)
 
static FwdEegSphereModelsetup_eeg_sphere_model (const QString &eeg_model_file, QString eeg_model_name, float eeg_sphere_rad)
 
static fitUser new_fit_user (int nfit, int nterms)
 
static void next_legen (int n, double x, double *p0, double *p01, double *p1, double *p11)
 
static void calc_pot_components (double beta, double cgamma, double *Vrp, double *Vtp, const Eigen::VectorXd &fn, int nterms)
 
static int fwd_eeg_multi_spherepot (float *rd, float *Q, float **el, int neeg, float *Vval, void *client)
 
static int fwd_eeg_multi_spherepot_coil1 (float *rd, float *Q, FwdCoilSet *els, float *Vval, void *client)
 
static bool fwd_eeg_spherepot_vec (float *rd, float **el, int neeg, float **Vval_vec, void *client)
 
static int fwd_eeg_spherepot_coil_vec (float *rd, FwdCoilSet *els, float **Vval_vec, void *client)
 
static int fwd_eeg_spherepot_grad_coil (float *rd, float Q[], FwdCoilSet *coils, float Vval[], float xgrad[], float ygrad[], float zgrad[], void *client)
 
static int fwd_eeg_spherepot (float *rd, float *Q, float **el, int neeg, Eigen::VectorXf &Vval, void *client)
 
static int fwd_eeg_spherepot_coil (float *rd, float *Q, FwdCoilSet *els, float *Vval, void *client)
 
static void compose_linear_fitting_data (const Eigen::VectorXd &mu, fitUser u)
 
static double compute_linear_parameters (const Eigen::VectorXd &mu, Eigen::VectorXd &lambda, fitUser u)
 
static double one_step (const Eigen::VectorXd &mu, const void *user_data)
 

Public Attributes

QString name
 
QList< FwdEegSphereLayerlayers
 
Eigen::Vector3f r0
 
Eigen::VectorXd fn
 
int nterms
 
Eigen::VectorXf mu
 
Eigen::VectorXf lambda
 
int nfit
 
int scale_pos
 

Detailed Description

Electric Current Dipole description.

Implements FwdEegSphereModel (Replaces *fwdEegSphereModel,fwdEegSphereModelRec struct of MNE-C fwd_types.h).

Definition at line 91 of file fwd_eeg_sphere_model.h.

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for FwdEegSphereModel.

Definition at line 95 of file fwd_eeg_sphere_model.h.

◆ SPtr

Shared pointer type for FwdEegSphereModel.

Definition at line 94 of file fwd_eeg_sphere_model.h.

Constructor & Destructor Documentation

◆ FwdEegSphereModel() [1/2]

FwdEegSphereModel::FwdEegSphereModel ( )
explicit

Constructs the Forward EEG Sphere Model Refactored: fwd_new_eeg_sphere_model

Definition at line 204 of file fwd_eeg_sphere_model.cpp.

◆ FwdEegSphereModel() [2/2]

FwdEegSphereModel::FwdEegSphereModel ( const FwdEegSphereModel p_FwdEegSphereModel)
explicit

Copy constructor. Refactored: fwd_dup_eeg_sphere_model

Parameters
[in]p_FwdEegSphereModelForward EEG Sphere Model which should be copied.

Definition at line 219 of file fwd_eeg_sphere_model.cpp.

◆ ~FwdEegSphereModel()

FwdEegSphereModel::~FwdEegSphereModel ( )
virtual

Destroys the Electric Current Dipole description Refactored: fwd_free_eeg_sphere_model

Definition at line 287 of file fwd_eeg_sphere_model.cpp.

Member Function Documentation

◆ fwd_eeg_fit_berg_scherg()

bool FwdEegSphereModel::fwd_eeg_fit_berg_scherg ( int  nterms,
int  nfit,
float &  rv 
)

Number of layers.

Definition at line 1310 of file fwd_eeg_sphere_model.cpp.

◆ fwd_eeg_get_multi_sphere_model_coeff()

double FwdEegSphereModel::fwd_eeg_get_multi_sphere_model_coeff ( int  n)

fwd_multi_spherepot.c Get the model depended weighting factor for n Refactored: fwd_eeg_get_multi_sphere_model_coeff (fwd_multi_spherepot.c)

Parameters
[in]ncoefficient to which the expansion shopuld be calculated.
Returns
the weighting factor for n.

Definition at line 343 of file fwd_eeg_sphere_model.cpp.

◆ fwd_eeg_spherepot()

int FwdEegSphereModel::fwd_eeg_spherepot ( float *  rd,
float *  Q,
float **  el,
int  neeg,
Eigen::VectorXf &  Vval,
void *  client 
)
static

fwd_multi_spherepot.c

This routine calculates the potentials for a specific dipole direction

This routine uses the acceleration with help of equivalent sources in the homogeneous sphere.

Parameters
[in]rdDipole position.
[in]QDipole moment.
[in]elElectrode positions.
[in]neegNumber of electrodes.
[in]VvalThe potential values.
[in]client.
Returns
true when successful.

Definition at line 860 of file fwd_eeg_sphere_model.cpp.

◆ fwd_eeg_spherepot_coil()

int FwdEegSphereModel::fwd_eeg_spherepot_coil ( float *  rd,
float *  Q,
FwdCoilSet els,
float *  Vval,
void *  client 
)
static

fwd_multi_spherepot.c

Calculate the EEG in the sphere model using the megCoil structure MEG channels are skipped

Parameters
[in]rdDipole position.
[in]QDipole moment.
[in]elsElectrode positions.
[in]VvalThe potential values.
[in]client.
Returns
true when successful.

Definition at line 977 of file fwd_eeg_sphere_model.cpp.

◆ fwd_eeg_spherepot_coil_vec()

int FwdEegSphereModel::fwd_eeg_spherepot_coil_vec ( float *  rd,
FwdCoilSet els,
float **  Vval_vec,
void *  client 
)
static

fwd_multi_spherepot.c

Calculate the EEG in the sphere model using the fwdCoilSet structure MEG channels are skipped

This routine uses the acceleration with help of equivalent sources in the homogeneous sphere.

Parameters
[in]rdDipole position.
[in]elsElectrode positions.
[in]Vval_vecThe potential values; Vval_vec[0][k] potentials given by Q = (1.0,0.0,0.0) at electrode k; Vval_vec[1][k] potentials given by Q = (0.0,1.0,0.0) at electrode k; Vval_vec[2][k] potentials given by Q = (0.0,0.0,1.0) at electrode k.
[in]client.
Returns
true when successful.

Definition at line 787 of file fwd_eeg_sphere_model.cpp.

◆ fwd_eeg_spherepot_vec()

bool FwdEegSphereModel::fwd_eeg_spherepot_vec ( float *  rd,
float **  el,
int  neeg,
float **  Vval_vec,
void *  client 
)
static

Compute the electric potentials in a set of electrodes in spherically Symmetric head model. This routine calculates the fields for all dipole directions.

The code is based on the formulas presented in

J.C. Moscher, R.M. Leahy, and P.S. Lewis, Matrix Kernels for Modeling of EEG and MEG Data, Los Alamos Technical Report, LA-UR-96-1993, 1996.

This routine uses the acceleration with help of equivalent sources in the homogeneous sphere.

Refactored: fwd_eeg_spherepot_vec (fwd_multi_spherepot.c)

Parameters
[in]rdDipole position.
[in]elElectrode positions.
[in]neegNumber of electrodes.
[in]Vval_vecThe potential values Vval_vec[0][k] potentials given by Q = (1.0,0.0,0.0) at electrode k; Vval_vec[1][k] potentials given by Q = (0.0,1.0,0.0) at electrode k; Vval_vec[2][k] potentials given by Q = (0.0,0.0,1.0) at electrode k.
Returns
true when successful.

Definition at line 675 of file fwd_eeg_sphere_model.cpp.

◆ fwd_setup_eeg_sphere_model()

bool FwdEegSphereModel::fwd_setup_eeg_sphere_model ( float  rad,
bool  fit_berg_scherg,
int  nfit 
)

fwd_eeg_sphere_models.c

Setup the EEG sphere model calculations

Parameters
[in]rad.
[in]fit_berg_schergIf Fit Berg Scherg should be performed.
[in]nfit.
Returns
True when setup was successful, false otherwise.

Definition at line 1006 of file fwd_eeg_sphere_model.cpp.

◆ setup_eeg_sphere_model()

FwdEegSphereModel * FwdEegSphereModel::setup_eeg_sphere_model ( const QString &  eeg_model_file,
QString  eeg_model_name,
float  eeg_sphere_rad 
)
static

Set up the desired sphere model for EEG Refactored: setup_eeg_sphere_model (dipole_fit_setup.c)

Parameters
[in]eeg_model_fileContains the model specifications.
[in]eeg_model_nameName of the model to use.
[in]eeg_sphere_radOuter surface radius.
Returns
the setup eeg sphere model.

Definition at line 293 of file fwd_eeg_sphere_model.cpp.

Member Data Documentation

◆ fn

Eigen::VectorXd FWDLIB::FwdEegSphereModel::fn

Coefficients saved to speed up the computations.

Definition at line 330 of file fwd_eeg_sphere_model.h.

◆ layers

QList<FwdEegSphereLayer> FWDLIB::FwdEegSphereModel::layers

An array of layers.

Definition at line 327 of file fwd_eeg_sphere_model.h.

◆ mu

Eigen::VectorXf FWDLIB::FwdEegSphereModel::mu

The Berg-Scherg equivalence parameters.

Definition at line 333 of file fwd_eeg_sphere_model.h.

◆ name

QString FWDLIB::FwdEegSphereModel::name

Textual identifier.

Definition at line 326 of file fwd_eeg_sphere_model.h.

◆ nfit

int FWDLIB::FwdEegSphereModel::nfit

How many?.

Definition at line 335 of file fwd_eeg_sphere_model.h.

◆ nterms

int FWDLIB::FwdEegSphereModel::nterms

How many?.

Definition at line 331 of file fwd_eeg_sphere_model.h.

◆ r0

Eigen::Vector3f FWDLIB::FwdEegSphereModel::r0

The origin.

Definition at line 328 of file fwd_eeg_sphere_model.h.

◆ scale_pos

int FWDLIB::FwdEegSphereModel::scale_pos

Scale the positions to the surface of the sphere?.

Definition at line 336 of file fwd_eeg_sphere_model.h.


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