37#ifndef FWD_EEG_SPHERE_MODEL_H
38#define FWD_EEG_SPHERE_MODEL_H
99 typedef std::unique_ptr<FwdEegSphereModel>
UPtr;
131 const Eigen::VectorXf& rads,
132 const Eigen::VectorXf& sigmas);
209 const Eigen::VectorXd&
fn,
229 const Eigen::Vector3f& Q,
230 const Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>& el,
232 Eigen::VectorXf& Vval,
249 const Eigen::Vector3f& Q,
251 Eigen::Ref<Eigen::VectorXf> Vval,
278 static bool fwd_eeg_spherepot_vec (
const Eigen::Vector3f& rd,
const Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>& el,
int neeg, Eigen::MatrixXf& Vval_vec,
void *client);
317 const Eigen::Vector3f& Q,
319 Eigen::Ref<Eigen::VectorXf> Vval,
320 Eigen::Ref<Eigen::VectorXf> xgrad,
321 Eigen::Ref<Eigen::VectorXf> ygrad,
322 Eigen::Ref<Eigen::VectorXf> zgrad,
343 static int fwd_eeg_spherepot(
const Eigen::Vector3f& rd,
const Eigen::Vector3f& Q,
const Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>& el,
int neeg, Eigen::VectorXf& Vval,
void *client);
409 static double one_step (
const Eigen::VectorXd&
mu,
const void *user_data);
Forward library export/import macros.
FwdCoilSet class declaration.
FwdEegSphereLayer class declaration.
Forward modelling (BEM, MEG/EEG lead fields).
Collection of FwdCoil objects representing a full MEG or EEG sensor array.
Workspace for the linear least-squares fit of Berg-Scherg parameters in the EEG sphere model (SVD mat...
static double compute_linear_parameters(const Eigen::VectorXd &mu, Eigen::VectorXd &lambda, fitUser u)
static int fwd_eeg_multi_spherepot_coil1(const Eigen::Vector3f &rd, const Eigen::Vector3f &Q, FwdCoilSet &els, Eigen::Ref< Eigen::VectorXf > Vval, void *client)
static FwdEegSphereModel::UPtr setup_eeg_sphere_model(const QString &eeg_model_file, QString eeg_model_name, float eeg_sphere_rad)
static void calc_pot_components(double beta, double cgamma, double &Vrp, double &Vtp, const Eigen::VectorXd &fn, int nterms)
static fitUser new_fit_user(int nfit, int nterms)
static int fwd_eeg_spherepot(const Eigen::Vector3f &rd, const Eigen::Vector3f &Q, const Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > &el, int neeg, Eigen::VectorXf &Vval, void *client)
static bool fwd_eeg_spherepot_vec(const Eigen::Vector3f &rd, const Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > &el, int neeg, Eigen::MatrixXf &Vval_vec, void *client)
bool fwd_eeg_fit_berg_scherg(int nterms, int nfit, float &rv)
static void compose_linear_fitting_data(const Eigen::VectorXd &mu, fitUser u)
static int fwd_eeg_spherepot_grad_coil(const Eigen::Vector3f &rd, const Eigen::Vector3f &Q, FwdCoilSet &coils, Eigen::Ref< Eigen::VectorXf > Vval, Eigen::Ref< Eigen::VectorXf > xgrad, Eigen::Ref< Eigen::VectorXf > ygrad, Eigen::Ref< Eigen::VectorXf > zgrad, void *client)
static int fwd_eeg_multi_spherepot(const Eigen::Vector3f &rd, const Eigen::Vector3f &Q, const Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > &el, int neeg, Eigen::VectorXf &Vval, void *client)
static int fwd_eeg_spherepot_coil_vec(const Eigen::Vector3f &rd, FwdCoilSet &els, Eigen::Ref< Eigen::MatrixXf > Vval_vec, void *client)
static FwdEegSphereModel::UPtr fwd_create_eeg_sphere_model(const QString &name, int nlayer, const Eigen::VectorXf &rads, const Eigen::VectorXf &sigmas)
std::vector< FwdEegSphereLayer > layers
static void next_legen(int n, double x, double &p0, double &p01, double &p1, double &p11)
std::unique_ptr< FwdEegSphereModel > UPtr
static int fwd_eeg_spherepot_coil(const Eigen::Vector3f &rd, const Eigen::Vector3f &Q, FwdCoilSet &els, Eigen::Ref< Eigen::VectorXf > Vval, void *client)
double fwd_eeg_get_multi_sphere_model_coeff(int n)
bool fwd_setup_eeg_sphere_model(float rad, bool fit_berg_scherg, int nfit)
static double one_step(const Eigen::VectorXd &mu, const void *user_data)