v2.0.0
Loading...
Searching...
No Matches
fiff_info_base.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef FIFF_INFO_BASE_H
38#define FIFF_INFO_BASE_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "fiff_global.h"
45#include "fiff_types.h"
46#include "fiff_id.h"
47#include "fiff_ch_info.h"
48#include "fiff_dig_point.h"
49#include "fiff_ctf_comp.h"
50#include "fiff_coord_trans.h"
51#include "fiff_proj.h"
52
53//=============================================================================================================
54// QT INCLUDES
55//=============================================================================================================
56
57#include <QList>
58#include <QStringList>
59#include <QSharedPointer>
60
61//=============================================================================================================
62// DEFINE NAMESPACE FIFFLIB
63//=============================================================================================================
64
65namespace FIFFLIB
66{
67
68//=============================================================================================================
75{
76
77public:
78 typedef QSharedPointer<FiffInfoBase> SPtr;
79 typedef QSharedPointer<const FiffInfoBase> ConstSPtr;
80
81 //=========================================================================================================
86
87 //=========================================================================================================
93 FiffInfoBase(const FiffInfoBase& p_FiffInfoBase);
94
95 //=========================================================================================================
99 virtual ~FiffInfoBase();
100
101 //=========================================================================================================
105 void clear();
106
107 //=========================================================================================================
115 QString channel_type(qint32 idx) const;
116
117 //=========================================================================================================
123 inline bool isEmpty() const;
124
125 //=========================================================================================================
137 static Eigen::RowVectorXi pick_channels(const QStringList& ch_names,
138 const QStringList& include = defaultQStringList,
139 const QStringList& exclude = defaultQStringList);
140
141 //=========================================================================================================
151 FiffInfoBase pick_info(const Eigen::RowVectorXi* sel = nullptr) const;
152
153 //=========================================================================================================
167 Eigen::RowVectorXi pick_types(const QString meg,
168 bool eeg = false,
169 bool stim = false,
170 const QStringList& include = defaultQStringList,
171 const QStringList& exclude = defaultQStringList) const;
172
173 //=========================================================================================================
188 Eigen::RowVectorXi pick_types(bool meg,
189 bool eeg = false,
190 bool stim = false,
191 const QStringList& include = defaultQStringList,
192 const QStringList& exclude = defaultQStringList) const;
193
201 friend bool operator== (const FiffInfoBase &a, const FiffInfoBase &b);
202
208 QStringList get_channel_types();
209
210public:
211 QString filename;
212 QStringList bads;
215 QList<FiffChInfo> chs;
216 QStringList ch_names;
219};
220
221//=============================================================================================================
222// INLINE DEFINITIONS
223//=============================================================================================================
224
225inline bool FiffInfoBase::isEmpty() const
226{
227 return this->nchan <= 0;
228}
229
230//=============================================================================================================
231
232inline bool operator== (const FiffInfoBase &a, const FiffInfoBase &b)
233{
234 return (a.filename == b.filename &&
235 a.bads == b.bads &&
236 //a.meas_id == b.meas_id &&
237 a.nchan == b.nchan &&
238 a.chs == b.chs &&
239 a.ch_names == b.ch_names &&
240 a.dev_head_t == b.dev_head_t &&
241 a.ctf_head_t == b.ctf_head_t);
242}
243} // NAMESPACE
244
245#endif // FIFF_INFO_BASE_H
Fiff library export/import macros.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:52
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
bool operator==(const FiffChInfo &a, const FiffChInfo &b)
Coordinate transformation description.
Universally unique identifier.
Definition fiff_id.h:67
QSharedPointer< const FiffInfoBase > ConstSPtr
static Eigen::RowVectorXi pick_channels(const QStringList &ch_names, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList)
QString channel_type(qint32 idx) const
QList< FiffChInfo > chs
FiffInfoBase pick_info(const Eigen::RowVectorXi *sel=nullptr) const
FiffCoordTrans ctf_head_t
QSharedPointer< FiffInfoBase > SPtr
QStringList get_channel_types()
Eigen::RowVectorXi pick_types(const QString meg, bool eeg=false, bool stim=false, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const
FiffCoordTrans dev_head_t