MNE-CPP  beta 1.0
fiff_evoked.h
1 //=============================================================================================================
36 #ifndef FIFF_EVOKED_H
37 #define FIFF_EVOKED_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // FIFF INCLUDES
43 //=============================================================================================================
44 
45 #include "fiff_global.h"
46 #include "fiff_info.h"
47 #include "fiff_types.h"
48 
49 
50 //*************************************************************************************************************
51 //=============================================================================================================
52 // Eigen INCLUDES
53 //=============================================================================================================
54 
55 #include <Eigen/Core>
56 
57 
58 //*************************************************************************************************************
59 //=============================================================================================================
60 // Qt INCLUDES
61 //=============================================================================================================
62 
63 #include <QString>
64 #include <QVariant>
65 #include <QPair>
66 #include <QSharedPointer>
67 
68 
69 //*************************************************************************************************************
70 //=============================================================================================================
71 // DEFINE NAMESPACE MNELIB
72 //=============================================================================================================
73 
74 namespace FIFFLIB
75 {
76 
77 //*************************************************************************************************************
78 //=============================================================================================================
79 // USED NAMESPACES
80 //=============================================================================================================
81 
82 using namespace Eigen;
83 
84 
85 //=============================================================================================================
92 {
93 public:
94  typedef QSharedPointer<FiffEvoked> SPtr;
95  typedef QSharedPointer<const FiffEvoked> ConstSPtr;
97  //=========================================================================================================
101  FiffEvoked();
102 
103  //=========================================================================================================
116  FiffEvoked(QIODevice& p_IODevice, QVariant setno = 0, QPair<QVariant,QVariant> baseline = defaultVariantPair, bool proj = true, fiff_int_t p_aspect_kind = FIFFV_ASPECT_AVERAGE);
117 
118  //=========================================================================================================
124  FiffEvoked(const FiffEvoked& p_FiffEvoked);
125 
126  //=========================================================================================================
130  ~FiffEvoked();
131 
132  //=========================================================================================================
136  inline QStringList ch_names();
137 
138  //=========================================================================================================
142  void clear();
143 
144  //=========================================================================================================
151  inline QString aspectKindToString() const;
152 
153  //=========================================================================================================
159  inline bool isEmpty();
160 
161  //=========================================================================================================
174  FiffEvoked pick_channels(const QStringList& include = defaultQStringList, const QStringList& exclude = defaultQStringList) const;
175 
176  //=========================================================================================================
198  static bool read(QIODevice& p_IODevice, FiffEvoked& p_FiffEvoked, QVariant setno = 0, QPair<QVariant,QVariant> baseline = defaultVariantPair, bool proj = true, fiff_int_t p_aspect_kind = FIFFV_ASPECT_AVERAGE);
199 
200  //=========================================================================================================
207  void setInfo(FiffInfo &p_info, bool proj = true);
208 
209 public:
211  fiff_int_t nave;
212  fiff_int_t aspect_kind;
213  fiff_int_t first;
214  fiff_int_t last;
215  QString comment;
216  RowVectorXf times;
217  MatrixXd data;
218  MatrixXd proj;
219 };
220 
221 //*************************************************************************************************************
222 //=============================================================================================================
223 // INLINE DEFINITIONS
224 //=============================================================================================================
225 
226 
227 inline QStringList FiffEvoked::ch_names()
228 {
229  return info.ch_names;
230 }
231 
232 
233 //*************************************************************************************************************
234 
235 inline QString FiffEvoked::aspectKindToString() const
236 {
237  if(aspect_kind == FIFFV_ASPECT_AVERAGE)
238  return QString("Average");
239  else if(aspect_kind == FIFFV_ASPECT_STD_ERR)
240  return QString("Standard_error");
241  else
242  return QString("Unknown");
243 }
244 
245 
246 //*************************************************************************************************************
247 
248 inline bool FiffEvoked::isEmpty()
249 {
250  return nave == -1;
251 }
252 
253 } // NAMESPACE
254 
255 #endif // FIFF_EVOKED_H
FIFF measurement file information.
Definition: fiff_info.h:96
Old fiff_type declarations - replace them.
evoked data
Definition: fiff_evoked.h:91
RowVectorXf times
Definition: fiff_evoked.h:216
fiff_int_t aspect_kind
Definition: fiff_evoked.h:212
QStringList ch_names()
Definition: fiff_evoked.h:227
FiffInfo class declaration.
QSharedPointer< const FiffEvoked > ConstSPtr
Definition: fiff_evoked.h:95
QSharedPointer< FiffEvoked > SPtr
Definition: fiff_evoked.h:94
#define FIFFSHARED_EXPORT
Definition: fiff_global.h:58
QString aspectKindToString() const
Definition: fiff_evoked.h:235
#define FIFFV_ASPECT_AVERAGE
Fiff library export/import macros.
Definition: fiff.h:98
#define FIFFV_ASPECT_STD_ERR