MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
fiff_ch_info.h
Go to the documentation of this file.
1//=============================================================================================================
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;
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:
119 fiff_int_t scanNo;
120 fiff_int_t logNo;
121 fiff_int_t kind;
122 fiff_float_t range;
123 fiff_float_t cal;
125 fiff_int_t unit;
126 fiff_int_t unit_mul;
127 QString ch_name;
129 //Convinience members - MATLAB -
130 Eigen::Matrix<float,4,4, Eigen::DontAlign> coil_trans;
131 Eigen::Matrix<float,3,2, Eigen::DontAlign> eeg_loc;
132 fiff_int_t coord_frame;
134// ### OLD STRUCT ###
135//typedef struct _fiffChInfoRec {
136// fiff_int_t scanNo; /**< Scanning order number. */
137// fiff_int_t logNo; /**< Logical channel #. */
138// fiff_int_t kind; /**< Kind of channel. */
139// fiff_float_t range; /**< Voltmeter range (-1 = auto ranging). */
140// fiff_float_t cal; /**< Calibration from volts to units used. */
141// fiff_ch_pos_t chpos; /**< Channel location. */
142// fiff_int_t unit; /**< Unit of measurement. */
143// fiff_int_t unit_mul; /**< Unit multiplier exponent. */
144// fiff_char_t ch_name[16]; /**< Descriptive name for the channel. */
145//} fiffChInfoRec,*fiffChInfo; /**< Description of one channel. */
146
147// /** Alias for fiffChInfoRec *
148// typedef fiffChInfoRec fiff_ch_info_t;
149};
150
151//=============================================================================================================
152// INLINE DEFINITIONS
153//=============================================================================================================
154
156{
157 return 96;
158}
159
160//=============================================================================================================
161
162inline bool operator== (const FiffChInfo &a, const FiffChInfo &b)
163{
164 return (a.scanNo == b.scanNo &&
165 a.logNo == b.logNo &&
166 a.kind == b.kind &&
167 a.range == b.range &&
168 a.cal == b.cal &&
169 a.chpos == b.chpos &&
170 a.unit == b.unit &&
171 a.unit_mul == b.unit_mul &&
172 a.coil_trans.isApprox(b.coil_trans, 0.0001f),
173 a.eeg_loc.isApprox(b.eeg_loc, 0.0001f),
174 a.coord_frame == b.coord_frame);
175}
176} // NAMESPACE
177
178#endif // FIFF_CH_INFO_H
FiffChPos class declaration.
Fiff library export/import macros.
#define FIFFSHARED_EXPORT
Definition fiff_global.h:56
Definitions for describing the objects in a FIFF file.
Channel info descriptor.
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