MNE-CPP  beta 1.0
fiff_info.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef FIFF_INFO_H
37 #define FIFF_INFO_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "fiff_global.h"
45 
46 #include "fiff_info_base.h"
47 
48 #include "fiff_types.h"
49 #include "fiff_id.h"
50 #include "fiff_ch_info.h"
51 #include "fiff_dig_point.h"
52 #include "fiff_ctf_comp.h"
53 #include "fiff_coord_trans.h"
54 #include "fiff_proj.h"
55 
56 
57 //*************************************************************************************************************
58 //=============================================================================================================
59 // Qt INCLUDES
60 //=============================================================================================================
61 
62 #include <QList>
63 #include <QStringList>
64 #include <QSharedPointer>
65 
66 
67 //*************************************************************************************************************
68 //=============================================================================================================
69 // DEFINE NAMESPACE FIFFLIB
70 //=============================================================================================================
71 
72 namespace FIFFLIB
73 {
74 
75 
76 //*************************************************************************************************************
77 //=============================================================================================================
78 // USED NAMESPACES
79 //=============================================================================================================
80 
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // FORWARD DECLARATIONS
85 //=============================================================================================================
86 
87 class FiffStream;
88 
89 
90 //=============================================================================================================
97 {
98 public:
99  typedef QSharedPointer<FiffInfo> SPtr;
100  typedef QSharedPointer<const FiffInfo> ConstSPtr;
102  //=========================================================================================================
106  FiffInfo();
107 
108  //=========================================================================================================
114  FiffInfo(const FiffInfo& p_FiffInfo);
115 
116  //=========================================================================================================
120  ~FiffInfo();
121 
122  //=========================================================================================================
126  void clear();
127 
128  //=========================================================================================================
143  bool make_compensator(fiff_int_t from, fiff_int_t to, FiffCtfComp& ctf_comp, bool exclude_comp_chs = false) const;
144 
145  //=========================================================================================================
155  qint32 get_current_comp();
156 
157  //=========================================================================================================
169  inline qint32 make_projector(MatrixXd& proj) const;
170 
171  //=========================================================================================================
184  inline qint32 make_projector(MatrixXd& proj, const QStringList& p_chNames) const;
185 
186  //=========================================================================================================
198  FiffInfo pick_info(const RowVectorXi &sel = defaultVectorXi) const;
199 
200  //=========================================================================================================
206  inline void set_current_comp(fiff_int_t value);
207 
208  //=========================================================================================================
224  static QList<FiffChInfo> set_current_comp(QList<FiffChInfo>& chs, fiff_int_t value);
225 
226 // ToDo
227 // //=========================================================================================================
228 // /**
229 // * Writes the fiff information to an I/O Device, e.g. fiff file
230 // *
231 // * @param [in] p_IODevice IO device to write the fiff info to.
232 // */
233 // void write(QIODevice &p_IODevice);
234 
235  //=========================================================================================================
241  void writeToStream(FiffStream* p_pStream);
242 
243 private:
244  //=========================================================================================================
255  bool make_compensator(fiff_int_t kind, MatrixXd& this_comp) const;
256 
257 public: //Public because it's a mne struct
259  fiff_int_t meas_date[2];
260  float sfreq;
261  float highpass;
262  float lowpass;
264  QList<FiffDigPoint> dig;
266  QList<FiffProj> projs;
267  QList<FiffCtfComp> comps;
268  QString acq_pars;
269  QString acq_stim;
270 };
271 
272 //*************************************************************************************************************
273 //=============================================================================================================
274 // INLINE DEFINITIONS
275 //=============================================================================================================
276 
277 inline qint32 FiffInfo::make_projector(MatrixXd& proj) const
278 {
279  return FiffProj::make_projector(this->projs,this->ch_names, proj, this->bads);
280 }
281 
282 
283 //*************************************************************************************************************
284 
285 inline qint32 FiffInfo::make_projector(MatrixXd& proj, const QStringList& p_chNames) const
286 {
287  return FiffProj::make_projector(this->projs, p_chNames, proj, this->bads);
288 }
289 
290 
291 //*************************************************************************************************************
292 
293 inline void FiffInfo::set_current_comp(fiff_int_t value)
294 {
295  this->chs = set_current_comp(this->chs, value);
296 }
297 
298 
299 } // NAMESPACE
300 
301 #endif // FIFF_INFO_H
QList< FiffCtfComp > comps
Definition: fiff_info.h:267
FIFF measurement file information.
Definition: fiff_info.h:96
QString acq_stim
Definition: fiff_info.h:269
FiffProj class declaration.
Old fiff_type declarations - replace them.
QList< FiffProj > projs
Definition: fiff_info.h:266
QSharedPointer< const FiffInfo > ConstSPtr
Definition: fiff_info.h:100
Universially unique identifier.
Definition: fiff_id.h:78
void set_current_comp(fiff_int_t value)
Definition: fiff_info.h:293
QSharedPointer< FiffInfo > SPtr
Definition: fiff_info.h:99
FiffInfoBase class declaration.
FiffChInfo class declaration.
FiffCtfComp class declaration.
#define FIFFSHARED_EXPORT
Definition: fiff_global.h:58
QList< FiffChInfo > chs
Fiff library export/import macros.
static fiff_int_t make_projector(const QList< FiffProj > &projs, const QStringList &ch_names, MatrixXd &proj, const QStringList &bads=defaultQStringList, MatrixXd &U=defaultMatrixXd, bool include_active=true)
Definition: fiff_proj.cpp:125
Definition: fiff.h:98
qint32 make_projector(MatrixXd &proj) const
Definition: fiff_info.h:277
FiffId class declaration.
QList< FiffDigPoint > dig
Definition: fiff_info.h:264
FiffCoordTrans dev_ctf_t
Definition: fiff_info.h:263
Coordinate transformation description.
FiffDigPoint class declaration.
CTF software compensation data.
Definition: fiff_ctf_comp.h:87
light measurement info
FIFF File I/O routines.
Definition: fiff_stream.h:129
QString acq_pars
Definition: fiff_info.h:268
FiffCoordTrans class declaration.
FiffCoordTrans dig_trans
Definition: fiff_info.h:265