v2.0.0
Loading...
Searching...
No Matches
fiff_info.h
Go to the documentation of this file.
1//=============================================================================================================
37
38#ifndef FIFF_INFO_H
39#define FIFF_INFO_H
40
41//=============================================================================================================
42// INCLUDES
43//=============================================================================================================
44
45#include "fiff_global.h"
46
47#include "fiff_info_base.h"
48
49#include "fiff_types.h"
50#include "fiff_id.h"
51#include "fiff_ch_info.h"
52#include "fiff_dig_point.h"
53#include "fiff_ctf_comp.h"
54#include "fiff_coord_trans.h"
55#include "fiff_proj.h"
56
57//=============================================================================================================
58// QT INCLUDES
59//=============================================================================================================
60
61#include <QList>
62#include <QStringList>
63#include <QSharedPointer>
64
65//=============================================================================================================
66// DEFINE NAMESPACE FIFFLIB
67//=============================================================================================================
68
69namespace FIFFLIB
70{
71
72//=============================================================================================================
73// FIFFLIB FORWARD DECLARATIONS
74//=============================================================================================================
75
76class FiffStream;
77
78//=============================================================================================================
85{
86public:
87 typedef QSharedPointer<FiffInfo> SPtr;
88 typedef QSharedPointer<const FiffInfo> ConstSPtr;
89
90 //=========================================================================================================
94 FiffInfo();
95
96 //=========================================================================================================
102 FiffInfo(const FiffInfo& p_FiffInfo);
103
104 //=========================================================================================================
108 ~FiffInfo();
109
110 //=========================================================================================================
114 void clear();
115
116 //=========================================================================================================
129 bool make_compensator(fiff_int_t from, fiff_int_t to, FiffCtfComp& ctf_comp, bool exclude_comp_chs = false) const;
130
131 //=========================================================================================================
139 qint32 get_current_comp();
140
141 //=========================================================================================================
151 inline qint32 make_projector(Eigen::MatrixXd& proj) const;
152
153 //=========================================================================================================
164 inline qint32 make_projector(Eigen::MatrixXd& proj, const QStringList& p_chNames) const;
165
166 //=========================================================================================================
176 FiffInfo pick_info(const Eigen::RowVectorXi &sel = defaultVectorXi) const;
177
178 //=========================================================================================================
184 inline void set_current_comp(fiff_int_t value);
185
186 //=========================================================================================================
200 static QList<FiffChInfo> set_current_comp(QList<FiffChInfo>& listFiffChInfo, fiff_int_t value);
201
202// ToDo
203// //=========================================================================================================
204// /**
205// * Writes the fiff information to an I/O Device, e.g. fiff file
206// *
207// * @param[in] p_IODevice IO device to write the fiff info to.
208// */
209// void write(QIODevice &p_IODevice);
210
211 //=========================================================================================================
217 void writeToStream(FiffStream* p_pStream) const;
218
219 //=========================================================================================================
223 void print() const;
224
225private:
226 //=========================================================================================================
237 bool make_compensator(fiff_int_t kind, Eigen::MatrixXd& this_comp) const;
238
239public: //Public because it's a mne struct
242 float sfreq;
243 float linefreq;
244 float highpass;
245 float lowpass;
247 QString proj_name;
249 QString experimenter;
250 QString description;
251 QString utc_offset;
254 QList<FiffDigPoint> dig;
256 QList<FiffProj> projs;
257 QList<FiffCtfComp> comps;
258 QString acq_pars;
259 QString acq_stim;
260};
261
262//=============================================================================================================
263// INLINE DEFINITIONS
264//=============================================================================================================
265
266inline qint32 FiffInfo::make_projector(Eigen::MatrixXd& proj) const
267{
268 return FiffProj::make_projector(this->projs,this->ch_names, proj, this->bads);
269}
270
271//=============================================================================================================
272
273inline qint32 FiffInfo::make_projector(Eigen::MatrixXd& proj, const QStringList& p_chNames) const
274{
275 return FiffProj::make_projector(this->projs, p_chNames, proj, this->bads);
276}
277
278//=============================================================================================================
279
281{
282 this->chs = set_current_comp(this->chs, value);
283}
284} // NAMESPACE
285
286#endif // FIFF_INFO_H
Fiff library export/import macros.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:52
FiffInfoBase class declaration.
FiffCtfComp class declaration.
FiffChInfo class declaration.
FiffId class declaration.
FiffProj class declaration.
Old fiff_type declarations - replace them.
FiffCoordTrans class declaration.
FiffDigPoint class declaration.
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
qint32 fiff_int_t
Definition fiff_types.h:89
Coordinate transformation description.
CTF software compensation data.
Universally unique identifier.
Definition fiff_id.h:67
FiffInfo pick_info(const Eigen::RowVectorXi &sel=defaultVectorXi) const
void set_current_comp(fiff_int_t value)
Definition fiff_info.h:280
void print() const
QString description
Definition fiff_info.h:250
qint32 make_projector(Eigen::MatrixXd &proj) const
Definition fiff_info.h:266
FiffCoordTrans dev_ctf_t
Definition fiff_info.h:253
QSharedPointer< const FiffInfo > ConstSPtr
Definition fiff_info.h:88
fiff_int_t gantry_angle
Definition fiff_info.h:252
void writeToStream(FiffStream *p_pStream) const
FiffCoordTrans dig_trans
Definition fiff_info.h:255
QList< FiffCtfComp > comps
Definition fiff_info.h:257
qint32 get_current_comp()
QSharedPointer< FiffInfo > SPtr
Definition fiff_info.h:87
QString xplotter_layout
Definition fiff_info.h:248
fiff_int_t meas_date[2]
Definition fiff_info.h:241
bool make_compensator(fiff_int_t from, fiff_int_t to, FiffCtfComp &ctf_comp, bool exclude_comp_chs=false) const
QList< FiffDigPoint > dig
Definition fiff_info.h:254
QString experimenter
Definition fiff_info.h:249
QList< FiffProj > projs
Definition fiff_info.h:256
QList< FiffChInfo > chs
static fiff_int_t make_projector(const QList< FiffProj > &projs, const QStringList &ch_names, Eigen::MatrixXd &proj, const QStringList &bads=defaultQStringList, Eigen::MatrixXd &U=defaultMatrixXd)
FIFF File I/O routines.