v2.0.0
Loading...
Searching...
No Matches
mne_meas_data.h
Go to the documentation of this file.
1//=============================================================================================================
36
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/mne_types.h>
48#include <mne/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
62#include <memory>
63
64#include <QDebug>
65
66//=============================================================================================================
67// FORWARD DECLARATIONS
68//=============================================================================================================
69
70namespace FIFFLIB { class FiffCoordTrans; }
71
72namespace MNELIB
73{
74 class MNENamedMatrix;
75}
76
77//=============================================================================================================
78// DEFINE NAMESPACE INVERSELIB
79//=============================================================================================================
80
81namespace INVERSELIB
82{
83
84//=============================================================================================================
85// INVERSELIB FORWARD DECLARATIONS
86//=============================================================================================================
87
89class MNEMeasDataSet;
90
91//=============================================================================================================
98{
99public:
100 typedef QSharedPointer<MNEMeasData> SPtr;
101 typedef QSharedPointer<const MNEMeasData> ConstSPtr;
102
103 //=========================================================================================================
108 MNEMeasData();
109
110 //=========================================================================================================
115 ~MNEMeasData();
116
117 //=========================================================================================================
125 void adjust_baselines(float bmin, float bmax);
126
127 //============================= mne_read_data.c =============================
128
129 static MNEMeasData* mne_read_meas_data_add(const QString& name, /* Name of the measurement file */
130 int set, /* Which data set */
131 MNEInverseOperator* op, /* For consistency checks */
132 MNELIB::MNENamedMatrix* fwd, /* Another option for consistency checks */
133 const QStringList& namesp, /* Yet another option: explicit name list */
134 int nnamesp,
135 MNEMeasData* add_to);
136
137 static MNEMeasData* mne_read_meas_data(const QString& name, /* Name of the measurement file */
138 int set, /* Which data set */
139 MNEInverseOperator* op, /* For consistency checks */
140 MNELIB::MNENamedMatrix* fwd, /* Another option for consistency checks */
141 const QStringList& namesp, /* Yet another option: explicit name list */
142 int nnamesp);
143
144public:
145 QString filename; /* The source file name */
146 FIFFLIB::fiffId meas_id; /* The id from the measurement file */
147 FIFFLIB::FiffTime meas_date; /* The measurement date from the file */
148 QList<FIFFLIB::FiffChInfo> chs; /* The channel information */
149 std::unique_ptr<FIFFLIB::FiffCoordTrans> meg_head_t; /* MEG device <-> head coordinate transformation */
150 std::unique_ptr<FIFFLIB::FiffCoordTrans> mri_head_t; /* MRI device <-> head coordinate transformation (duplicated from the inverse operator or loaded separately) */
151 float sfreq; /* Sampling frequency */
152 int nchan; /* Number of channels */
153 float highpass; /* Highpass filter setting */
154 float lowpass; /* Lowpass filter setting */
155 MNELIB::MNEProjOp* proj; /* Associated projection operator (useful if inverse operator is not included) */
156 std::unique_ptr<MNELIB::MNECTFCompDataSet> comp;
157 MNEInverseOperator* op; /* Associated inverse operator */
158 MNELIB::MNENamedMatrix* fwd; /* Forward operator for dipole fitting */
159 MNELIB::MNERawData* raw; /* This will be non-null if the data stems from a raw data file */
160 MNELIB::mneChSelection chsel; /* Channel selection for raw data */
161 QStringList badlist; /* Bad channel names */
162 int nbad; /* How many? */
163 int *bad; /* Which channels are bad? */
164 /*
165 * These are the data sets loaded
166 */
167 int ch_major; /* Rows are channels rather than times */
168 QList<MNEMeasDataSet*> sets; /* All loaded data sets */
169 int nset; /* How many */
170 MNEMeasDataSet* current; /* Which is the current one */
171
172// ### OLD STRUCT ###
173//typedef struct { /* Measurement data representation in MNE calculations */
175//* These are common to all data sets
176//*/
177// char *filename; /* The source file name */
178// FIFFLIB::fiffId meas_id; /* The id from the measurement file */
179// FIFFLIB::fiffTimeRec meas_date; /* The measurement date from the file */
180// FIFFLIB::fiffChInfo chs; /* The channel information */
181// INVERSELIB::FiffCoordTransOld* meg_head_t; /* MEG device <-> head coordinate transformation */
182// INVERSELIB::FiffCoordTransOld* mri_head_t; /* MRI device <-> head coordinate transformation (duplicated from the inverse operator or loaded separately) */
183// float sfreq; /* Sampling frequency */
184// int nchan; /* Number of channels */
185// float highpass; /* Highpass filter setting */
186// float lowpass; /* Lowpass filter setting */
187// mneProjOp proj; /* Associated projection operator (useful if inverse operator is not included) */
188// mneCTFcompDataSet comp; /* The software gradient compensation data */
189// mneInverseOperator op; /* Associated inverse operator */
190// mneNamedMatrix fwd; /* Forward operator for dipole fitting */
191// mneRawData raw; /* This will be non-null if the data stems from a raw data file */
192// mneChSelection chsel; /* Channel selection for raw data */
193// char **badlist; /* Bad channel names */
194// int nbad; /* How many? */
195// int *bad; /* Which channels are bad? */
196// /*
197// * These are the data sets loaded
198// */
199// int ch_major; /* Rows are channels rather than times */
200// INVERSELIB::MNEMeasDataSet* *sets; /* All loaded data sets */
201// int nset; /* How many */
202// INVERSELIB::MNEMeasDataSet* current; /* Which is the current one */
203//} *mneMeasData,mneMeasDataRec;
204};
205
206//=============================================================================================================
207// INLINE DEFINITIONS
208//=============================================================================================================
209} // NAMESPACE INVERSELIB
210
211#endif // MNEMEASDATA_H
Old fiff_type declarations - replace them.
MNERawData class declaration.
Legacy MNE-C constants and common typedefs.
inverse library export/import macros.
#define INVERSESHARED_EXPORT
Core MNE data structures (source spaces, source estimates, hemispheres).
MNEChSelection * mneChSelection
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
FiffId * fiffId
Backward-compatible pointer typedef for the old fiffId pointer.
Definition fiff_types.h:130
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Coordinate transformation description.
Time stamp record storing seconds and microseconds since epoch.
Definition fiff_time.h:61
MNE inverse operator combining noise covariance, forward solution, and source covariance for source e...
FIFFLIB::fiffId meas_id
MNELIB::MNERawData * raw
static MNEMeasData * mne_read_meas_data_add(const QString &name, int set, MNEInverseOperator *op, MNELIB::MNENamedMatrix *fwd, const QStringList &namesp, int nnamesp, MNEMeasData *add_to)
std::unique_ptr< FIFFLIB::FiffCoordTrans > mri_head_t
QSharedPointer< const MNEMeasData > ConstSPtr
void adjust_baselines(float bmin, float bmax)
QList< FIFFLIB::FiffChInfo > chs
MNELIB::MNEProjOp * proj
MNEInverseOperator * op
MNELIB::MNENamedMatrix * fwd
FIFFLIB::FiffTime meas_date
QList< MNEMeasDataSet * > sets
static MNEMeasData * mne_read_meas_data(const QString &name, int set, MNEInverseOperator *op, MNELIB::MNENamedMatrix *fwd, const QStringList &namesp, int nnamesp)
std::unique_ptr< MNELIB::MNECTFCompDataSet > comp
std::unique_ptr< FIFFLIB::FiffCoordTrans > meg_head_t
MNELIB::mneChSelection chsel
MNEMeasDataSet * current
QSharedPointer< MNEMeasData > SPtr
Single measurement epoch or average within MNEMeasData, including data matrix and projectors.
A dense matrix with named rows and columns.
Projection operator managing a set of linear projection items and the final compiled projector matrix...
Definition mne_proj_op.h:83
A comprehensive raw data structure.