MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
fwd_eeg_sphere_model.cpp File Reference

Definition of the FwdEegSphereModel Class. More...

#include "utils/simplex_algorithm.h"
#include "fwd_eeg_sphere_model.h"
#include "fwd_eeg_sphere_model_set.h"
#include <QtAlgorithms>
#include <qmath.h>
#include <Eigen/Core>
#include <Eigen/Dense>
Include dependency graph for fwd_eeg_sphere_model.cpp:

Go to the source code of this file.

Classes

struct  FWDLIB::bergSchergPar
 

Macros

#define MIN_1(a, b)   ((a) < (b) ? (a) : (b))
 
#define X_1   0
 
#define Y_1   1
 
#define Z_1   2
 
#define VEC_DOT_1(x, y)   ((x)[X_1]*(y)[X_1] + (x)[Y_1]*(y)[Y_1] + (x)[Z_1]*(y)[Z_1])
 
#define VEC_LEN_1(x)   sqrt(VEC_DOT_1(x,x))
 
#define VEC_DIFF_1(from, to, diff)
 
#define VEC_COPY_1(to, from)
 
#define CROSS_PRODUCT_1(x, y, xy)
 
#define MALLOC_1(x, t)   (t *)malloc((x)*sizeof(t))
 
#define REALLOC_1(x, y, t)   (t *)((x == NULL) ? malloc((y)*sizeof(t)) : realloc((x),(y)*sizeof(t)))
 
#define FREE(x)   if ((char *)(x) != NULL) free((char *)(x))
 
#define ALLOC_DCMATRIX_1(x, y)   mne_dmatrix_1((x),(y))
 
#define FREE_DCMATRIX_1(m)   mne_free_dcmatrix_1((m))
 
#define ALLOC_CMATRIX_1(x, y)   mne_cmatrix_1((x),(y))
 
#define FREE_CMATRIX_1(m)   mne_free_cmatrix_1((m))
 
#define TRUE   1
 
#define FALSE   0
 
#define FAIL   -1
 
#define OK   0
 
#define MAXTERMS   1000
 
#define EPS   1e-10
 
#define SIN_EPS   1e-3
 

Typedefs

typedef struct FWDLIB::bergSchergPar FWDLIB::bergSchergParRec
 

Functions

float ** mne_cmatrix_1 (int nr, int nc)
 
double ** mne_dmatrix_1 (int nr, int nc)
 
void mne_free_cmatrix_1 (float **m)
 
void mne_free_dcmatrix_1 (double **m)
 
Eigen::MatrixXd toDoubleEigenMatrix (double **mat, const int m, const int n)
 
void fromDoubleEigenMatrix (const Eigen::MatrixXd &from_mat, double **to_mat, const int m, const int n)
 
void fromDoubleEigenMatrix (const Eigen::MatrixXd &from_mat, double **to_mat)
 
void fromDoubleEigenVector (const Eigen::VectorXd &from_vec, double *to_vec, const int n)
 
void fromDoubleEigenVector (const Eigen::VectorXd &from_vec, double *to_vec)
 

Detailed Description

Definition of the FwdEegSphereModel Class.

Author
Lorenz Esch lesch.nosp@m.@mgh.nosp@m..harv.nosp@m.ard..nosp@m.edu; Matti Hamalainen msh@n.nosp@m.mr.m.nosp@m.gh.ha.nosp@m.rvar.nosp@m.d.edu; Christoph Dinh chdin.nosp@m.h@nm.nosp@m.r.mgh.nosp@m..har.nosp@m.vard..nosp@m.edu
Since
0.1.0
Date
December, 2016

LICENSE

Copyright (C) 2016, Lorenz Esch, Matti Hamalainen, Christoph Dinh. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file fwd_eeg_sphere_model.cpp.

Macro Definition Documentation

◆ ALLOC_CMATRIX_1

#define ALLOC_CMATRIX_1 (   x,
 
)    mne_cmatrix_1((x),(y))

Definition at line 102 of file fwd_eeg_sphere_model.cpp.

◆ ALLOC_DCMATRIX_1

#define ALLOC_DCMATRIX_1 (   x,
 
)    mne_dmatrix_1((x),(y))

Definition at line 99 of file fwd_eeg_sphere_model.cpp.

◆ CROSS_PRODUCT_1

#define CROSS_PRODUCT_1 (   x,
  y,
  xy 
)
Value:
{\
(xy)[X_1] = (x)[Y_1]*(y)[Z_1]-(y)[Y_1]*(x)[Z_1];\
(xy)[Y_1] = -((x)[X_1]*(y)[Z_1]-(y)[X_1]*(x)[Z_1]);\
(xy)[Z_1] = (x)[X_1]*(y)[Y_1]-(y)[X_1]*(x)[Y_1];\
}

Definition at line 87 of file fwd_eeg_sphere_model.cpp.

◆ EPS

#define EPS   1e-10

Definition at line 194 of file fwd_eeg_sphere_model.cpp.

◆ FAIL

#define FAIL   -1

Definition at line 118 of file fwd_eeg_sphere_model.cpp.

◆ FALSE

#define FALSE   0

Definition at line 114 of file fwd_eeg_sphere_model.cpp.

◆ FREE

#define FREE (   x)    if ((char *)(x) != NULL) free((char *)(x))

Definition at line 97 of file fwd_eeg_sphere_model.cpp.

◆ FREE_CMATRIX_1

#define FREE_CMATRIX_1 (   m)    mne_free_cmatrix_1((m))

Definition at line 107 of file fwd_eeg_sphere_model.cpp.

◆ FREE_DCMATRIX_1

#define FREE_DCMATRIX_1 (   m)    mne_free_dcmatrix_1((m))

Definition at line 100 of file fwd_eeg_sphere_model.cpp.

◆ MALLOC_1

#define MALLOC_1 (   x,
 
)    (t *)malloc((x)*sizeof(t))

Definition at line 93 of file fwd_eeg_sphere_model.cpp.

◆ MAXTERMS

#define MAXTERMS   1000

Definition at line 193 of file fwd_eeg_sphere_model.cpp.

◆ MIN_1

#define MIN_1 (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 61 of file fwd_eeg_sphere_model.cpp.

◆ OK

#define OK   0

Definition at line 122 of file fwd_eeg_sphere_model.cpp.

◆ REALLOC_1

#define REALLOC_1 (   x,
  y,
 
)    (t *)((x == NULL) ? malloc((y)*sizeof(t)) : realloc((x),(y)*sizeof(t)))

Definition at line 95 of file fwd_eeg_sphere_model.cpp.

◆ SIN_EPS

#define SIN_EPS   1e-3

Definition at line 195 of file fwd_eeg_sphere_model.cpp.

◆ TRUE

#define TRUE   1

Definition at line 110 of file fwd_eeg_sphere_model.cpp.

◆ VEC_COPY_1

#define VEC_COPY_1 (   to,
  from 
)
Value:
{\
(to)[X_1] = (from)[X_1];\
(to)[Y_1] = (from)[Y_1];\
(to)[Z_1] = (from)[Z_1];\
}

Definition at line 81 of file fwd_eeg_sphere_model.cpp.

◆ VEC_DIFF_1

#define VEC_DIFF_1 (   from,
  to,
  diff 
)
Value:
{\
(diff)[X_1] = (to)[X_1] - (from)[X_1];\
(diff)[Y_1] = (to)[Y_1] - (from)[Y_1];\
(diff)[Z_1] = (to)[Z_1] - (from)[Z_1];\
}

Definition at line 75 of file fwd_eeg_sphere_model.cpp.

◆ VEC_DOT_1

#define VEC_DOT_1 (   x,
 
)    ((x)[X_1]*(y)[X_1] + (x)[Y_1]*(y)[Y_1] + (x)[Z_1]*(y)[Z_1])

Definition at line 70 of file fwd_eeg_sphere_model.cpp.

◆ VEC_LEN_1

#define VEC_LEN_1 (   x)    sqrt(VEC_DOT_1(x,x))

Definition at line 71 of file fwd_eeg_sphere_model.cpp.

◆ X_1

#define X_1   0

Definition at line 64 of file fwd_eeg_sphere_model.cpp.

◆ Y_1

#define Y_1   1

Definition at line 65 of file fwd_eeg_sphere_model.cpp.

◆ Z_1

#define Z_1   2

Definition at line 66 of file fwd_eeg_sphere_model.cpp.

Function Documentation

◆ fromDoubleEigenMatrix() [1/2]

void fromDoubleEigenMatrix ( const Eigen::MatrixXd &  from_mat,
double **  to_mat 
)

Definition at line 1050 of file fwd_eeg_sphere_model.cpp.

◆ fromDoubleEigenMatrix() [2/2]

void fromDoubleEigenMatrix ( const Eigen::MatrixXd &  from_mat,
double **  to_mat,
const int  m,
const int  n 
)

Definition at line 1043 of file fwd_eeg_sphere_model.cpp.

◆ fromDoubleEigenVector() [1/2]

void fromDoubleEigenVector ( const Eigen::VectorXd &  from_vec,
double *  to_vec 
)

Definition at line 1061 of file fwd_eeg_sphere_model.cpp.

◆ fromDoubleEigenVector() [2/2]

void fromDoubleEigenVector ( const Eigen::VectorXd &  from_vec,
double *  to_vec,
const int  n 
)

Definition at line 1055 of file fwd_eeg_sphere_model.cpp.

◆ mne_cmatrix_1()

float ** mne_cmatrix_1 ( int  nr,
int  nc 
)

Definition at line 142 of file fwd_eeg_sphere_model.cpp.

◆ mne_dmatrix_1()

double ** mne_dmatrix_1 ( int  nr,
int  nc 
)

Definition at line 159 of file fwd_eeg_sphere_model.cpp.

◆ mne_free_cmatrix_1()

void mne_free_cmatrix_1 ( float **  m)

Definition at line 176 of file fwd_eeg_sphere_model.cpp.

◆ mne_free_dcmatrix_1()

void mne_free_dcmatrix_1 ( double **  m)

Definition at line 184 of file fwd_eeg_sphere_model.cpp.

◆ toDoubleEigenMatrix()

Eigen::MatrixXd toDoubleEigenMatrix ( double **  mat,
const int  m,
const int  n 
)

Definition at line 1032 of file fwd_eeg_sphere_model.cpp.