v2.0.0
Loading...
Searching...
No Matches
fiff_info_base.h
Go to the documentation of this file.
1//=============================================================================================================
30
31#ifndef FIFF_INFO_BASE_H
32#define FIFF_INFO_BASE_H
33
34//=============================================================================================================
35// INCLUDES
36//=============================================================================================================
37
38#include "fiff_global.h"
39#include "fiff_types.h"
40#include "fiff_id.h"
41#include "fiff_ch_info.h"
42#include "fiff_dig_point.h"
43#include "fiff_ctf_comp.h"
44#include "fiff_coord_trans.h"
45#include "fiff_proj.h"
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QList>
52#include <QStringList>
53#include <QSharedPointer>
54#include <memory>
55
56//=============================================================================================================
57// DEFINE NAMESPACE FIFFLIB
58//=============================================================================================================
59
60namespace FIFFLIB
61{
62
63//=============================================================================================================
74{
75
76public:
77 using SPtr = QSharedPointer<FiffInfoBase>;
78 using ConstSPtr = QSharedPointer<const FiffInfoBase>;
79 using UPtr = std::unique_ptr<FiffInfoBase>;
80 using ConstUPtr = std::unique_ptr<const FiffInfoBase>;
81
82 //=========================================================================================================
87
88 //=========================================================================================================
94 FiffInfoBase(const FiffInfoBase& p_FiffInfoBase);
95
96 //=========================================================================================================
100 virtual ~FiffInfoBase();
101
102 //=========================================================================================================
106 void clear();
107
108 //=========================================================================================================
116 QString channel_type(qint32 idx) const;
117
118 //=========================================================================================================
124 inline bool isEmpty() const;
125
126 //=========================================================================================================
138 static Eigen::RowVectorXi pick_channels(const QStringList& ch_names,
139 const QStringList& include = defaultQStringList,
140 const QStringList& exclude = defaultQStringList);
141
142 //=========================================================================================================
152 FiffInfoBase pick_info(const Eigen::RowVectorXi* sel = nullptr) const;
153
154 //=========================================================================================================
168 Eigen::RowVectorXi pick_types(const QString meg,
169 bool eeg = false,
170 bool stim = false,
171 const QStringList& include = defaultQStringList,
172 const QStringList& exclude = defaultQStringList) const;
173
174 //=========================================================================================================
189 Eigen::RowVectorXi pick_types(bool meg,
190 bool eeg = false,
191 bool stim = false,
192 const QStringList& include = defaultQStringList,
193 const QStringList& exclude = defaultQStringList) const;
194
202 friend bool operator== (const FiffInfoBase &a, const FiffInfoBase &b);
203
219 void mne_read_meg_comp_eeg_ch_info(QList<FiffChInfo>& megp,
220 int& nmegp,
221 QList<FiffChInfo>& meg_compp,
222 int& nmeg_compp,
223 QList<FiffChInfo>& eegp,
224 int& neegp,
225 FiffCoordTrans& meg_head_t,
226 FiffId& idp) const;
227
233 QStringList get_channel_types();
234
235 //=========================================================================================================
243 static bool readBadChannelsFromFile(const QString& name, QStringList& listOut);
244
245public:
246 QString filename;
247 QStringList bads;
249 fiff_int_t nchan;
250 QList<FiffChInfo> chs;
251 QStringList ch_names;
254 QList<FiffCoordTrans> all_coord_trans;
255};
256
257//=============================================================================================================
258// INLINE DEFINITIONS
259//=============================================================================================================
260
261inline bool FiffInfoBase::isEmpty() const
262{
263 return this->nchan <= 0;
264}
265
266//=============================================================================================================
267
268inline bool operator== (const FiffInfoBase &a, const FiffInfoBase &b)
269{
270 return (a.bads == b.bads &&
271 //a.meas_id == b.meas_id &&
272 a.nchan == b.nchan &&
273 a.chs == b.chs &&
274 a.ch_names == b.ch_names &&
275 a.dev_head_t == b.dev_head_t &&
276 a.ctf_head_t == b.ctf_head_t);
277}
278} // NAMESPACE
279
280#endif // FIFF_INFO_BASE_H
bool operator==(const BIDSPath &a, const BIDSPath &b)
128-bit FIFF identifier record (machine ID + creation time) used to stamp files, blocks and parent re...
SSP projection item: a named projection vector set with active/desired flags, parsed from FIFFB_PROJ_...
FIFF channel descriptor record (FIFF_CH_INFO): per-channel logical/scanner numbers,...
Export/import macros and build-info accessors for the FIFFLIB shared library.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:44
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system.
CTF / 4D Neuroimaging software gradient-compensation matrix block (FIFFB_MNE_CTF_COMP_DATA).
FIFF file I/O, in-memory data structures and high-level readers/writers.
bool operator==(const FiffChInfo &a, const FiffChInfo &b)
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
128-bit FIFF identifier: hardware machine ID plus creation time, stamped on every file and block.
Definition fiff_id.h:66
QSharedPointer< const FiffInfoBase > ConstSPtr
QList< FiffCoordTrans > all_coord_trans
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