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#include <memory>
61
62//=============================================================================================================
63// DEFINE NAMESPACE FIFFLIB
64//=============================================================================================================
65
66namespace FIFFLIB
67{
68
69//=============================================================================================================
76{
77
78public:
79 using SPtr = QSharedPointer<FiffInfoBase>;
80 using ConstSPtr = QSharedPointer<const FiffInfoBase>;
81 using UPtr = std::unique_ptr<FiffInfoBase>;
82 using ConstUPtr = std::unique_ptr<const FiffInfoBase>;
83
84 //=========================================================================================================
89
90 //=========================================================================================================
96 FiffInfoBase(const FiffInfoBase& p_FiffInfoBase);
97
98 //=========================================================================================================
102 virtual ~FiffInfoBase();
103
104 //=========================================================================================================
108 void clear();
109
110 //=========================================================================================================
118 QString channel_type(qint32 idx) const;
119
120 //=========================================================================================================
126 inline bool isEmpty() const;
127
128 //=========================================================================================================
140 static Eigen::RowVectorXi pick_channels(const QStringList& ch_names,
141 const QStringList& include = defaultQStringList,
142 const QStringList& exclude = defaultQStringList);
143
144 //=========================================================================================================
154 FiffInfoBase pick_info(const Eigen::RowVectorXi* sel = nullptr) const;
155
156 //=========================================================================================================
170 Eigen::RowVectorXi pick_types(const QString meg,
171 bool eeg = false,
172 bool stim = false,
173 const QStringList& include = defaultQStringList,
174 const QStringList& exclude = defaultQStringList) const;
175
176 //=========================================================================================================
191 Eigen::RowVectorXi pick_types(bool meg,
192 bool eeg = false,
193 bool stim = false,
194 const QStringList& include = defaultQStringList,
195 const QStringList& exclude = defaultQStringList) const;
196
204 friend bool operator== (const FiffInfoBase &a, const FiffInfoBase &b);
205
221 void mne_read_meg_comp_eeg_ch_info(QList<FiffChInfo>& megp,
222 int& nmegp,
223 QList<FiffChInfo>& meg_compp,
224 int& nmeg_compp,
225 QList<FiffChInfo>& eegp,
226 int& neegp,
227 FiffCoordTrans& meg_head_t,
228 FiffId& idp) const;
229
235 QStringList get_channel_types();
236
237 //=========================================================================================================
245 static bool readBadChannelsFromFile(const QString& name, QStringList& listOut);
246
247public:
248 QString filename;
249 QStringList bads;
252 QList<FiffChInfo> chs;
253 QStringList ch_names;
256};
257
258//=============================================================================================================
259// INLINE DEFINITIONS
260//=============================================================================================================
261
262inline bool FiffInfoBase::isEmpty() const
263{
264 return this->nchan <= 0;
265}
266
267//=============================================================================================================
268
269inline bool operator== (const FiffInfoBase &a, const FiffInfoBase &b)
270{
271 return (a.filename == b.filename &&
272 a.bads == b.bads &&
273 //a.meas_id == b.meas_id &&
274 a.nchan == b.nchan &&
275 a.chs == b.chs &&
276 a.ch_names == b.ch_names &&
277 a.dev_head_t == b.dev_head_t &&
278 a.ctf_head_t == b.ctf_head_t);
279}
280} // NAMESPACE
281
282#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.
bool operator==(const BIDSPath &a, const BIDSPath &b)
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:68
QSharedPointer< const FiffInfoBase > ConstSPtr
QSharedPointer< FiffInfoBase > SPtr
std::unique_ptr< FiffInfoBase > UPtr
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
std::unique_ptr< const FiffInfoBase > ConstUPtr
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
void mne_read_meg_comp_eeg_ch_info(QList< FiffChInfo > &megp, int &nmegp, QList< FiffChInfo > &meg_compp, int &nmeg_compp, QList< FiffChInfo > &eegp, int &neegp, FiffCoordTrans &meg_head_t, FiffId &idp) const
static bool readBadChannelsFromFile(const QString &name, QStringList &listOut)
FiffCoordTrans dev_head_t