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

Definition of the FwdBemModel Class. More...

#include "fwd_bem_model.h"
#include "fwd_bem_solution.h"
#include "fwd_eeg_sphere_model.h"
#include <mne/c/mne_surface_old.h>
#include <mne/c/mne_triangle.h>
#include <mne/c/mne_source_space_old.h>
#include "fwd_comp_data.h"
#include "fwd_thread_arg.h"
#include <fiff/fiff_stream.h>
#include <fiff/fiff_named_matrix.h>
#include <QFile>
#include <QList>
#include <QThread>
#include <QtConcurrent>
#include <math.h>
#include <Eigen/Dense>
#include <Eigen/Core>
Include dependency graph for fwd_bem_model.cpp:

Go to the source code of this file.

Classes

struct  FWDLIB::frameNameRec_40
 

Macros

#define _USE_MATH_DEFINES
 
#define TRUE   1
 
#define FALSE   0
 
#define FAIL   -1
 
#define OK   0
 
#define X_40   0
 
#define Y_40   1
 
#define Z_40   2
 
#define VEC_DIFF_40(from, to, diff)
 
#define VEC_COPY_40(to, from)
 
#define VEC_DOT_40(x, y)   ((x)[X_40]*(y)[X_40] + (x)[Y_40]*(y)[Y_40] + (x)[Z_40]*(y)[Z_40])
 
#define VEC_LEN_40(x)   sqrt(VEC_DOT_40(x,x))
 
#define CROSS_PRODUCT_40(x, y, xy)
 
#define MALLOC_40(x, t)   (t *)malloc((x)*sizeof(t))
 
#define ALLOC_CMATRIX_40(x, y)   mne_cmatrix_40((x),(y))
 
#define FREE_40(x)   if ((char *)(x) != NULL) free((char *)(x))
 
#define FREE_CMATRIX_40(m)   mne_free_cmatrix_40((m))
 
#define BEM_SUFFIX   "-bem.fif"
 
#define BEM_SOL_SUFFIX   "-bem-sol.fif"
 
#define ARSINH(x)   log((x) + sqrt(1.0+(x)*(x)))
 
#define EPS
 
#define CEPS   1e-5
 

Functions

void mne_free_cmatrix_40 (float **m)
 
float ** mne_cmatrix_40 (int nr, int nc)
 
Eigen::MatrixXf toFloatEigenMatrix_40 (float **mat, const int m, const int n)
 
void fromFloatEigenMatrix_40 (const Eigen::MatrixXf &from_mat, float **&to_mat, const int m, const int n)
 
void fromFloatEigenMatrix_40 (const Eigen::MatrixXf &from_mat, float **&to_mat)
 
float ** mne_lu_invert_40 (float **mat, int dim)
 
void mne_transpose_square_40 (float **mat, int n)
 
float mne_dot_vectors_40 (float *v1, float *v2, int nn)
 
void mne_add_scaled_vector_to_40 (float *v1, float scale, float *v2, int nn)
 
void mne_scale_vector_40 (double scale, float *v, int nn)
 
float ** mne_mat_mat_mult_40 (float **m1, float **m2, int d1, int d2, int d3)
 
const QString mne_coord_frame_name_40 (int frame)
 

Detailed Description

Definition of the FwdBemModel 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
January, 2017

LICENSE

Copyright (C) 2017, 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_bem_model.cpp.

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 61 of file fwd_bem_model.cpp.

◆ ALLOC_CMATRIX_40

#define ALLOC_CMATRIX_40 (   x,
 
)    mne_cmatrix_40((x),(y))

Definition at line 114 of file fwd_bem_model.cpp.

◆ ARSINH

#define ARSINH (   x)    log((x) + sqrt(1.0+(x)*(x)))

Definition at line 1943 of file fwd_bem_model.cpp.

◆ BEM_SOL_SUFFIX

#define BEM_SOL_SUFFIX   "-bem-sol.fif"

Definition at line 346 of file fwd_bem_model.cpp.

◆ BEM_SUFFIX

#define BEM_SUFFIX   "-bem.fif"

Definition at line 345 of file fwd_bem_model.cpp.

◆ CEPS

#define CEPS   1e-5

Definition at line 3579 of file fwd_bem_model.cpp.

◆ CROSS_PRODUCT_40

#define CROSS_PRODUCT_40 (   x,
  y,
  xy 
)
Value:
{\
(xy)[X_40] = (x)[Y_40]*(y)[Z_40]-(y)[Y_40]*(x)[Z_40];\
(xy)[Y_40] = -((x)[X_40]*(y)[Z_40]-(y)[X_40]*(x)[Z_40]);\
(xy)[Z_40] = (x)[X_40]*(y)[Y_40]-(y)[X_40]*(x)[Y_40];\
}

Definition at line 106 of file fwd_bem_model.cpp.

◆ EPS

#define EPS
Value:
1e-5 /* Points closer to origin than this many
meters are considered to be at the
origin */

Definition at line 3578 of file fwd_bem_model.cpp.

◆ FAIL

#define FAIL   -1

Definition at line 79 of file fwd_bem_model.cpp.

◆ FALSE

#define FALSE   0

Definition at line 75 of file fwd_bem_model.cpp.

◆ FREE_40

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

Definition at line 116 of file fwd_bem_model.cpp.

◆ FREE_CMATRIX_40

#define FREE_CMATRIX_40 (   m)    mne_free_cmatrix_40((m))

Definition at line 118 of file fwd_bem_model.cpp.

◆ MALLOC_40

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

Definition at line 112 of file fwd_bem_model.cpp.

◆ OK

#define OK   0

Definition at line 83 of file fwd_bem_model.cpp.

◆ TRUE

#define TRUE   1

Definition at line 71 of file fwd_bem_model.cpp.

◆ VEC_COPY_40

#define VEC_COPY_40 (   to,
  from 
)
Value:
{\
(to)[X_40] = (from)[X_40];\
(to)[Y_40] = (from)[Y_40];\
(to)[Z_40] = (from)[Z_40];\
}

Definition at line 96 of file fwd_bem_model.cpp.

◆ VEC_DIFF_40

#define VEC_DIFF_40 (   from,
  to,
  diff 
)
Value:
{\
(diff)[X_40] = (to)[X_40] - (from)[X_40];\
(diff)[Y_40] = (to)[Y_40] - (from)[Y_40];\
(diff)[Z_40] = (to)[Z_40] - (from)[Z_40];\
}

Definition at line 90 of file fwd_bem_model.cpp.

◆ VEC_DOT_40

#define VEC_DOT_40 (   x,
 
)    ((x)[X_40]*(y)[X_40] + (x)[Y_40]*(y)[Y_40] + (x)[Z_40]*(y)[Z_40])

Definition at line 102 of file fwd_bem_model.cpp.

◆ VEC_LEN_40

#define VEC_LEN_40 (   x)    sqrt(VEC_DOT_40(x,x))

Definition at line 104 of file fwd_bem_model.cpp.

◆ X_40

#define X_40   0

Definition at line 86 of file fwd_bem_model.cpp.

◆ Y_40

#define Y_40   1

Definition at line 87 of file fwd_bem_model.cpp.

◆ Z_40

#define Z_40   2

Definition at line 88 of file fwd_bem_model.cpp.

Function Documentation

◆ fromFloatEigenMatrix_40() [1/2]

void fromFloatEigenMatrix_40 ( const Eigen::MatrixXf &  from_mat,
float **&  to_mat 
)

Definition at line 181 of file fwd_bem_model.cpp.

◆ fromFloatEigenMatrix_40() [2/2]

void fromFloatEigenMatrix_40 ( const Eigen::MatrixXf &  from_mat,
float **&  to_mat,
const int  m,
const int  n 
)

Definition at line 174 of file fwd_bem_model.cpp.

◆ mne_add_scaled_vector_to_40()

void mne_add_scaled_vector_to_40 ( float *  v1,
float  scale,
float *  v2,
int  nn 
)

Definition at line 234 of file fwd_bem_model.cpp.

◆ mne_cmatrix_40()

float ** mne_cmatrix_40 ( int  nr,
int  nc 
)

Definition at line 145 of file fwd_bem_model.cpp.

◆ mne_coord_frame_name_40()

const QString mne_coord_frame_name_40 ( int  frame)

Definition at line 376 of file fwd_bem_model.cpp.

◆ mne_dot_vectors_40()

float mne_dot_vectors_40 ( float *  v1,
float *  v2,
int  nn 
)

Definition at line 215 of file fwd_bem_model.cpp.

◆ mne_free_cmatrix_40()

void mne_free_cmatrix_40 ( float **  m)

Definition at line 120 of file fwd_bem_model.cpp.

◆ mne_lu_invert_40()

float ** mne_lu_invert_40 ( float **  mat,
int  dim 
)

Definition at line 186 of file fwd_bem_model.cpp.

◆ mne_mat_mat_mult_40()

float ** mne_mat_mat_mult_40 ( float **  m1,
float **  m2,
int  d1,
int  d2,
int  d3 
)

Definition at line 266 of file fwd_bem_model.cpp.

◆ mne_scale_vector_40()

void mne_scale_vector_40 ( double  scale,
float *  v,
int  nn 
)

Definition at line 249 of file fwd_bem_model.cpp.

◆ mne_transpose_square_40()

void mne_transpose_square_40 ( float **  mat,
int  n 
)

Definition at line 198 of file fwd_bem_model.cpp.

◆ toFloatEigenMatrix_40()

Eigen::MatrixXf toFloatEigenMatrix_40 ( float **  mat,
const int  m,
const int  n 
)

Definition at line 163 of file fwd_bem_model.cpp.

Variable Documentation

◆ kind

int FWDLIB::kind

Definition at line 329 of file fwd_bem_model.cpp.

◆ method

int FWDLIB::method

Definition at line 337 of file fwd_bem_model.cpp.

◆ name

const QString FWDLIB::name

Definition at line 330 of file fwd_bem_model.cpp.