v2.0.0
Loading...
Searching...
No Matches
fiff_ch_info.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef FIFF_CH_INFO_H
38#define FIFF_CH_INFO_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "fiff_global.h"
45#include "fiff_types.h"
46#include "fiff_ch_pos.h"
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QSharedPointer>
53#include <QString>
54
55//=============================================================================================================
56// EIGEN INCLUDES
57//=============================================================================================================
58
59#include <Eigen/Core>
60
61//=============================================================================================================
62// DEFINE NAMESPACE FIFFLIB
63//=============================================================================================================
64
65namespace FIFFLIB
66{
67
68//=============================================================================================================
75{
76public:
77 typedef QSharedPointer<FiffChInfo> SPtr;
78 typedef QSharedPointer<const FiffChInfo> ConstSPtr;
79
80 //=========================================================================================================
84 FiffChInfo();
85
86 //=========================================================================================================
92 FiffChInfo(const FiffChInfo &p_FiffChInfo);
93
94 //=========================================================================================================
99
100 //=========================================================================================================
106 inline static qint32 storageSize();
107
108 //=========================================================================================================
116 friend bool operator== (const FiffChInfo &a, const FiffChInfo &b);
117
118public:
127 QString ch_name;
128
129 //Convenience members - MATLAB -
130 Eigen::Matrix<float,4,4, Eigen::DontAlign> coil_trans;
131 Eigen::Matrix<float,3,2, Eigen::DontAlign> eeg_loc;
133
134};
135
136//=============================================================================================================
137// INLINE DEFINITIONS
138//=============================================================================================================
139
141{
142 // On-disk layout: scanNo, logNo, kind, range, cal, chpos, unit, unit_mul, ch_name[16]
143 // (C++ class uses QString but on-disk stores fixed 16-char name)
144 return 3 * sizeof(fiff_int_t) + 2 * sizeof(fiff_float_t)
145 + FiffChPos::storageSize() + 2 * sizeof(fiff_int_t) + 16;
146}
147
148//=============================================================================================================
149
150inline bool operator== (const FiffChInfo &a, const FiffChInfo &b)
151{
152 return (a.scanNo == b.scanNo &&
153 a.logNo == b.logNo &&
154 a.kind == b.kind &&
155 a.range == b.range &&
156 a.cal == b.cal &&
157 a.chpos == b.chpos &&
158 a.unit == b.unit &&
159 a.unit_mul == b.unit_mul &&
160 a.coil_trans.isApprox(b.coil_trans, 0.0001f) &&
161 a.eeg_loc.isApprox(b.eeg_loc, 0.0001f) &&
162 a.coord_frame == b.coord_frame);
163}
164} // NAMESPACE
165
166#endif // FIFF_CH_INFO_H
FiffChPos class declaration.
Fiff library export/import macros.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:52
Old fiff_type declarations - replace them.
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
qint32 fiff_int_t
Definition fiff_types.h:89
float fiff_float_t
Definition fiff_types.h:93
bool operator==(const FiffChInfo &a, const FiffChInfo &b)
QSharedPointer< const FiffChInfo > ConstSPtr
static qint32 storageSize()
Eigen::Matrix< float, 3, 2, Eigen::DontAlign > eeg_loc
QSharedPointer< FiffChInfo > SPtr
Eigen::Matrix< float, 4, 4, Eigen::DontAlign > coil_trans
Measurement channel position and coil type.
Definition fiff_ch_pos.h:67
static qint32 storageSize()