MNE-CPP  0.1.9
A Framework for Electrophysiology
fwd_comp_data.h
Go to the documentation of this file.
1 //=============================================================================================================
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 
63 namespace MNELIB
64 {
65  class MneCTFCompDataSet;
66 }
67 
68 //=============================================================================================================
69 // DEFINE NAMESPACE FWDLIB
70 //=============================================================================================================
71 
72 namespace FWDLIB
73 {
74 
75 //=============================================================================================================
76 // FWDLIB FORWARD DECLARATIONS
77 //=============================================================================================================
78 
79 class FwdCoilSet;
80 
81 //=============================================================================================================
88 {
89 public:
90  typedef QSharedPointer<FwdCompData> SPtr;
91  typedef QSharedPointer<const FwdCompData> ConstSPtr;
93  //=========================================================================================================
98  FwdCompData();
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 */
119  FwdCoilSet* comp_coils);
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 */
125  fwdVecFieldFunc vec_field,
126  fwdFieldGradFunc field_grad, /* The field and gradient computation function */
127  void *client, /* Client data to be passed to the above */
128  fwdUserFreeFunc client_free);
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 
136 public:
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 */
143  fwdUserFreeFunc client_free;
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
FWDLIB::FwdCompData
This structure is used in the compensated field calculations.
Definition: fwd_comp_data.h:87
FWDLIB::FwdCoilSet
FwdCoilSet description.
Definition: fwd_coil_set.h:75
FWDSHARED_EXPORT
#define FWDSHARED_EXPORT
Definition: fwd_global.h:57
fwd_global.h
forward library export/import macros.
FWDLIB::FwdCompData::ConstSPtr
QSharedPointer< const FwdCompData > ConstSPtr
Definition: fwd_comp_data.h:91
MNELIB::MneCTFCompDataSet
One MNE CTF Compensation Data Set description.
Definition: mne_ctf_comp_data_set.h:81
FWDLIB::FwdCompData::SPtr
QSharedPointer< FwdCompData > SPtr
Definition: fwd_comp_data.h:90