MNE-CPP  0.1.9
A Framework for Electrophysiology
mne_meas_data.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef MNEMEASDATA_H
38 #define MNEMEASDATA_H
39 
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "../inverse_global.h"
45 #include <fiff/fiff_types.h>
46 
47 #include <mne/c/mne_types.h>
48 #include <mne/c/mne_raw_data.h>
49 
50 //=============================================================================================================
51 // EIGEN INCLUDES
52 //=============================================================================================================
53 
54 #include <Eigen/Core>
55 
56 //=============================================================================================================
57 // QT INCLUDES
58 //=============================================================================================================
59 
60 #include <QSharedPointer>
61 #include <QDebug>
62 
63 //=============================================================================================================
64 // FORWARD DECLARATIONS
65 //=============================================================================================================
66 
67 namespace MNELIB
68 {
69  class MneNamedMatrix;
70 }
71 
72 //=============================================================================================================
73 // DEFINE NAMESPACE INVERSELIB
74 //=============================================================================================================
75 
76 namespace INVERSELIB
77 {
78 
79 //=============================================================================================================
80 // INVERSELIB FORWARD DECLARATIONS
81 //=============================================================================================================
82 
83 class MneInverseOperator;
84 class MneMeasDataSet;
85 
86 //=============================================================================================================
93 {
94 public:
95  typedef QSharedPointer<MneMeasData> SPtr;
96  typedef QSharedPointer<const MneMeasData> ConstSPtr;
98  //=========================================================================================================
103  MneMeasData();
104 
105  //=========================================================================================================
110  ~MneMeasData();
111 
112  //=========================================================================================================
120  void adjust_baselines(float bmin, float bmax);
121 
122  //============================= mne_read_data.c =============================
123 
124  static MneMeasData* mne_read_meas_data_add(const QString& name, /* Name of the measurement file */
125  int set, /* Which data set */
126  MneInverseOperator* op, /* For consistency checks */
127  MNELIB::MneNamedMatrix* fwd, /* Another option for consistency checks */
128  const QStringList& namesp, /* Yet another option: explicit name list */
129  int nnamesp,
130  MneMeasData* add_to);
131 
132  static MneMeasData* mne_read_meas_data(const QString& name, /* Name of the measurement file */
133  int set, /* Which data set */
134  MneInverseOperator* op, /* For consistency checks */
135  MNELIB::MneNamedMatrix* fwd, /* Another option for consistency checks */
136  const QStringList& namesp, /* Yet another option: explicit name list */
137  int nnamesp);
138 
139 public:
140  QString filename; /* The source file name */
141  FIFFLIB::fiffId meas_id; /* The id from the measurement file */
142  FIFFLIB::fiffTimeRec meas_date; /* The measurement date from the file */
143  QList<FIFFLIB::FiffChInfo> chs; /* The channel information */
144  FIFFLIB::FiffCoordTransOld* meg_head_t; /* MEG device <-> head coordinate transformation */
145  FIFFLIB::FiffCoordTransOld* mri_head_t; /* MRI device <-> head coordinate transformation (duplicated from the inverse operator or loaded separately) */
146  float sfreq; /* Sampling frequency */
147  int nchan; /* Number of channels */
148  float highpass; /* Highpass filter setting */
149  float lowpass; /* Lowpass filter setting */
150  MNELIB::MneProjOp* proj; /* Associated projection operator (useful if inverse operator is not included) */
151  MNELIB::MneCTFCompDataSet* comp; /* The software gradient compensation data */
152  MneInverseOperator* op; /* Associated inverse operator */
153  MNELIB::MneNamedMatrix* fwd; /* Forward operator for dipole fitting */
154  MNELIB::MneRawData* raw; /* This will be non-null if the data stems from a raw data file */
155  MNELIB::mneChSelection chsel; /* Channel selection for raw data */
156  QStringList badlist; /* Bad channel names */
157  int nbad; /* How many? */
158  int *bad; /* Which channels are bad? */
159  /*
160  * These are the data sets loaded
161  */
162  int ch_major; /* Rows are channels rather than times */
163  QList<MneMeasDataSet*> sets; /* All loaded data sets */
164  int nset; /* How many */
165  MneMeasDataSet* current; /* Which is the current one */
166 
167 // ### OLD STRUCT ###
168 //typedef struct { /* Measurement data representation in MNE calculations */
170 //* These are common to all data sets
171 //*/
172 // char *filename; /* The source file name */
173 // FIFFLIB::fiffId meas_id; /* The id from the measurement file */
174 // FIFFLIB::fiffTimeRec meas_date; /* The measurement date from the file */
175 // FIFFLIB::fiffChInfo chs; /* The channel information */
176 // INVERSELIB::FiffCoordTransOld* meg_head_t; /* MEG device <-> head coordinate transformation */
177 // INVERSELIB::FiffCoordTransOld* mri_head_t; /* MRI device <-> head coordinate transformation (duplicated from the inverse operator or loaded separately) */
178 // float sfreq; /* Sampling frequency */
179 // int nchan; /* Number of channels */
180 // float highpass; /* Highpass filter setting */
181 // float lowpass; /* Lowpass filter setting */
182 // mneProjOp proj; /* Associated projection operator (useful if inverse operator is not included) */
183 // mneCTFcompDataSet comp; /* The software gradient compensation data */
184 // mneInverseOperator op; /* Associated inverse operator */
185 // mneNamedMatrix fwd; /* Forward operator for dipole fitting */
186 // mneRawData raw; /* This will be non-null if the data stems from a raw data file */
187 // mneChSelection chsel; /* Channel selection for raw data */
188 // char **badlist; /* Bad channel names */
189 // int nbad; /* How many? */
190 // int *bad; /* Which channels are bad? */
191 // /*
192 // * These are the data sets loaded
193 // */
194 // int ch_major; /* Rows are channels rather than times */
195 // INVERSELIB::MneMeasDataSet* *sets; /* All loaded data sets */
196 // int nset; /* How many */
197 // INVERSELIB::MneMeasDataSet* current; /* Which is the current one */
198 //} *mneMeasData,mneMeasDataRec;
199 };
200 
201 //=============================================================================================================
202 // INLINE DEFINITIONS
203 //=============================================================================================================
204 } // NAMESPACE INVERSELIB
205 
206 #endif // MNEMEASDATA_H
FIFFLIB::_fiffIdRec
ToDo Old implementation use new fiff_id.h instead.
Definition: fiff_types_mne-c.h:214
INVERSESHARED_EXPORT
#define INVERSESHARED_EXPORT
Definition: inverse_global.h:56
INVERSELIB::MneMeasDataSet
One data set, used in mneMeasData.
Definition: mne_meas_data_set.h:80
mne_raw_data.h
MneRawData class declaration.
FIFFLIB::_fiffTimeRec
Definition: fiff_types_mne-c.h:182
MNELIB::MneProjOp
One linear projection item.
Definition: mne_proj_op.h:83
MNELIB::MneRawData
A comprehensive raw data structure.
Definition: mne_raw_data.h:86
FIFFLIB::FiffCoordTransOld
Coordinate transformation descriptor.
Definition: fiff_coord_trans_old.h:80
MNELIB::mneChSelection
Definition: mne_types.h:538
INVERSELIB::MneMeasData::ConstSPtr
QSharedPointer< const MneMeasData > ConstSPtr
Definition: mne_meas_data.h:96
MNELIB::MneCTFCompDataSet
One MNE CTF Compensation Data Set description.
Definition: mne_ctf_comp_data_set.h:81
MNELIB::MneNamedMatrix
Matrix specification with a channel list.
Definition: mne_named_matrix.h:84
INVERSELIB::MneMeasData::SPtr
QSharedPointer< MneMeasData > SPtr
Definition: mne_meas_data.h:95
INVERSELIB::MneMeasData
easurement data representation in MNE calculations
Definition: mne_meas_data.h:92
INVERSELIB::MneInverseOperator
An inverse operator.
Definition: mne_inverse_operator.h:93
fiff_types.h
Definitions for describing the objects in a FIFF file.