v2.0.0
Loading...
Searching...
No Matches
fwd_comp_data.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef FWDCOMPDATA_H
38#define FWDCOMPDATA_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "fwd_global.h"
45#include "fwd_types.h"
46
47//=============================================================================================================
48// EIGEN INCLUDES
49//=============================================================================================================
50
51#include <Eigen/Core>
52
53//=============================================================================================================
54// QT INCLUDES
55//=============================================================================================================
56
57#include <QSharedPointer>
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63namespace MNELIB
64{
66}
67
68//=============================================================================================================
69// DEFINE NAMESPACE FWDLIB
70//=============================================================================================================
71
72namespace FWDLIB
73{
74
75//=============================================================================================================
76// FWDLIB FORWARD DECLARATIONS
77//=============================================================================================================
78
79class FwdCoilSet;
80
81//=============================================================================================================
88{
89public:
90 typedef QSharedPointer<FwdCompData> SPtr;
91 typedef QSharedPointer<const FwdCompData> ConstSPtr;
92
93 //=========================================================================================================
99
100 //=========================================================================================================
105 ~FwdCompData();
106
107 //============================= fwd_comp.c =============================
108
109 static int fwd_comp_field(float *rd,float *Q, FwdCoilSet* coils, float *res, void *client);
110
111 /*
112 * Routines to implement the reference channel compensation in field computations
113 */
114
115 static void fwd_free_comp_data(void *d);
116
117 static int fwd_make_ctf_comp_coils(MNELIB::MNECTFCompDataSet* set, /* The available compensation data */
118 FwdCoilSet* coils, /* The main coil set */
120
121 static FwdCompData* fwd_make_comp_data(MNELIB::MNECTFCompDataSet* set, /* The CTF compensation data read from the file */
122 FwdCoilSet* coils, /* The principal set of coils */
123 FwdCoilSet* comp_coils, /* The compensation coils */
124 fwdFieldFunc field, /* The field computation functions */
126 fwdFieldGradFunc field_grad, /* The field and gradient computation function */
127 void *client, /* Client data to be passed to the above */
129
130 static int fwd_comp_field_vec(float *rd, FwdCoilSet* coils, float **res, void *client);
131
132 static int fwd_comp_field_grad(float *rd,float *Q, FwdCoilSet* coils,
133 float *res, float *xgrad, float *ygrad, float *zgrad,
134 void *client);
135
136public:
137 MNELIB::MNECTFCompDataSet* set; /* The compensation data set */
138 FwdCoilSet* comp_coils; /* The compensation coil definitions */
139 fwdFieldFunc field; /* Computes the field of given direction dipole */
140 fwdVecFieldFunc vec_field; /* Computes the fields of all three dipole components */
141 fwdFieldGradFunc field_grad; /* Computes the field and gradient of one dipole direction */
142 void *client; /* Client data to pass to the above functions */
144 float *work; /* The work areas */
145 float **vec_work;
146
147// ### OLD STRUCT ###
148//typedef struct {
149// FWDLIB::MNECTFCompDataSet* set; /* The compensation data set */
150// FWDLIB::FwdCoilSet* comp_coils; /* The compensation coil definitions */
151// fwdFieldFunc field; /* Computes the field of given direction dipole */
152// fwdVecFieldFunc vec_field; /* Computes the fields of all three dipole components */
153// fwdFieldGradFunc field_grad; /* Computes the field and gradient of one dipole direction */
154// void *client; /* Client data to pass to the above functions */
155// fwdUserFreeFunc client_free;
156// float *work; /* The work areas */
157// float **vec_work;
158//} *fwdCompData,fwdCompDataRec; /* This structure is used in the compensated field calculations */
159};
160
161//=============================================================================================================
162// INLINE DEFINITIONS
163//=============================================================================================================
164} // NAMESPACE FWDLIB
165
166#endif // FWDCOMPDATA_H
int(* fwdFieldFunc)(float *rd, float *Q, FWDLIB::FwdCoilSet *coils, float *res, void *client)
Definition fwd_types.h:20
int(* fwdVecFieldFunc)(float *rd, FWDLIB::FwdCoilSet *coils, float **res, void *client)
Definition fwd_types.h:21
int(* fwdFieldGradFunc)(float *rd, float *Q, FWDLIB::FwdCoilSet *coils, float *res, float *xgrad, float *ygrad, float *zgrad, void *client)
Definition fwd_types.h:22
forward library export/import macros.
#define FWDSHARED_EXPORT
Definition fwd_global.h:53
void(* fwdUserFreeFunc)(void *)
Core MNE data structures (source spaces, source estimates, hemispheres).
Forward modelling (BEM, MEG/EEG lead fields).
Definition compute_fwd.h:95
Collection of FwdCoil objects representing a full MEG or EEG sensor array.
MNELIB::MNECTFCompDataSet * set
fwdVecFieldFunc vec_field
FwdCoilSet * comp_coils
static void fwd_free_comp_data(void *d)
QSharedPointer< FwdCompData > SPtr
fwdFieldGradFunc field_grad
static int fwd_make_ctf_comp_coils(MNELIB::MNECTFCompDataSet *set, FwdCoilSet *coils, FwdCoilSet *comp_coils)
QSharedPointer< const FwdCompData > ConstSPtr
static FwdCompData * fwd_make_comp_data(MNELIB::MNECTFCompDataSet *set, FwdCoilSet *coils, FwdCoilSet *comp_coils, fwdFieldFunc field, fwdVecFieldFunc vec_field, fwdFieldGradFunc field_grad, void *client, fwdUserFreeFunc client_free)
static int fwd_comp_field_grad(float *rd, float *Q, FwdCoilSet *coils, float *res, float *xgrad, float *ygrad, float *zgrad, void *client)
static int fwd_comp_field_vec(float *rd, FwdCoilSet *coils, float **res, void *client)
static int fwd_comp_field(float *rd, float *Q, FwdCoilSet *coils, float *res, void *client)
fwdUserFreeFunc client_free
Collection of CTF third-order gradient compensation operators.