37 #ifndef FWDEEGSPHEREMODEL_H
38 #define FWDEEGSPHEREMODEL_H
58 #include <QSharedPointer>
94 typedef QSharedPointer<FwdEegSphereModel>
SPtr;
95 typedef QSharedPointer<const FwdEegSphereModel>
ConstSPtr;
119 const Eigen::VectorXf& rads,
120 const Eigen::VectorXf& sigmas);
140 static FwdEegSphereModel* setup_eeg_sphere_model(
const QString& eeg_model_file, QString eeg_model_name,
float eeg_sphere_rad);
142 static fitUser new_fit_user(
int nfit,
int nterms);
154 double fwd_eeg_get_multi_sphere_model_coeff(
int n);
156 static void next_legen (
int n,
163 static void calc_pot_components(
double beta,
168 const Eigen::VectorXd& fn,
171 static int fwd_eeg_multi_spherepot(
float *rd,
178 static int fwd_eeg_multi_spherepot_coil1(
float *rd,
209 static bool fwd_eeg_spherepot_vec (
float *rd,
float **el,
int neeg,
float **Vval_vec,
void *client);
229 static int fwd_eeg_spherepot_coil_vec(
float *rd,
FwdCoilSet* els,
float **Vval_vec,
void *client);
231 static int fwd_eeg_spherepot_grad_coil(
float *rd,
258 static int fwd_eeg_spherepot(
float *rd,
float *Q,
float **el,
int neeg, Eigen::VectorXf& Vval,
void *client);
275 static int fwd_eeg_spherepot_coil(
float *rd,
float *Q,
FwdCoilSet* els,
float *Vval,
void *client);
289 bool fwd_setup_eeg_sphere_model(
float rad,
bool fit_berg_scherg,
int nfit);
293 static void compose_linear_fitting_data(
const Eigen::VectorXd& mu,
fitUser u);
300 static double compute_linear_parameters(
const Eigen::VectorXd& mu, Eigen::VectorXd& lambda,
fitUser u);
307 static double one_step (
const Eigen::VectorXd& mu,
const void *user_data);
314 bool fwd_eeg_fit_berg_scherg(
int nterms,
322 return layers.size();
334 Eigen::VectorXf lambda;
360 #endif // FWDEEGSPHEREMODEL_H