MNE-CPP  0.1.9
A Framework for Electrophysiology
mne_raw_info.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef MNERAWINFO_H
38 #define MNERAWINFO_H
39 
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "../mne_global.h"
46 
47 #include <fiff/fiff_dir_node.h>
48 #include <fiff/fiff_stream.h>
49 
50 //=============================================================================================================
51 // EIGEN INCLUDES
52 //=============================================================================================================
53 
54 #include <Eigen/Core>
55 
56 //=============================================================================================================
57 // QT INCLUDES
58 //=============================================================================================================
59 
60 #include <QSharedPointer>
61 #include <QList>
62 
63 //=============================================================================================================
64 // DEFINE NAMESPACE MNELIB
65 //=============================================================================================================
66 
67 namespace MNELIB
68 {
69 
70 //=============================================================================================================
71 // FORWARD DECLARATIONS
72 //=============================================================================================================
73 
74 //=============================================================================================================
81 {
82 public:
83  typedef QSharedPointer<MneRawInfo> SPtr;
84  typedef QSharedPointer<const MneRawInfo> ConstSPtr;
86  //=========================================================================================================
91  MneRawInfo();
92 
93  //=========================================================================================================
98  ~MneRawInfo();
99 
100  //============================= read_ch_info.c =============================
101 
102  static FIFFLIB::FiffDirNode::SPtr find_meas (const FIFFLIB::FiffDirNode::SPtr& node);
103 
104  static FIFFLIB::FiffDirNode::SPtr find_meas_info (const FIFFLIB::FiffDirNode::SPtr& node);
105 
106  static FIFFLIB::FiffDirNode::SPtr find_raw (const FIFFLIB::FiffDirNode::SPtr& node);
107 
108  static FIFFLIB::FiffDirNode::SPtr find_maxshield (const FIFFLIB::FiffDirNode::SPtr& node);
109 
110  static int get_meas_info (//fiffFile file, /* The file we are reading */
112  FIFFLIB::FiffDirNode::SPtr& node, /* The directory node containing our data */
113  FIFFLIB::fiffId *id, /* The block id from the nearest FIFFB_MEAS
114  parent */
115  int *nchan, /* Number of channels */
116  float *sfreq, /* Sampling frequency */
117  float *highpass, /* Highpass filter freq. */
118  float *lowpass, /* Lowpass filter setting */
119  QList<FIFFLIB::FiffChInfo>& chp, /* Channel descriptions */
120  FIFFLIB::FiffCoordTransOld* *trans, /* Coordinate transformation
121  (head <-> device) */
122  FIFFLIB::fiffTime *start_time);
123 
124  static int mne_load_raw_info(const QString& name,int allow_maxshield,MneRawInfo* *infop);
125 
126 public:
127  QString filename;
129  int nchan;
130  QList<FIFFLIB::FiffChInfo> chInfo;
137  float sfreq;
138  float lowpass;
139  float highpass;
144  int buf_size;
146  QList<FIFFLIB::FiffDirEntry::SPtr> rawDir;
153  int ndir;
155 //typedef struct { /**< Information about raw data in fiff file. */
157 // char *filename; /**< The name of the file this comes from. */
158 // FIFFLIB::fiffId id; /**< Measurement id from the file. */
159 // int nchan; /**< Number of channels. */
160 // FIFFLIB::fiffChInfo chInfo; /**< Channel info data . */
161 // int coord_frame; /**< Which coordinate frame are the
162 // * positions defined in?
163 // */
164 // MNELIB::FiffCoordTransOld* trans; /**< This is the coordinate transformation
165 // * FIFF_COORD_HEAD <--> FIFF_COORD_DEVICE
166 // */
167 // float sfreq; /**< Sampling frequency. */
168 // float lowpass; /**< Lowpass filter setting. */
169 // float highpass; /**< Highpass filter setting. */
170 // FIFFLIB::fiffTimeRec start_time; /**< Starting time of the acquisition
171 // * taken from the meas date
172 // * or the meas block id
173 // * whence it may be inaccurate. */
174 // int buf_size; /**< Buffer size in samples. */
175 // int maxshield_data; /**< Are these unprocessed MaxShield data. */
176 // QList<FIFFLIB::FiffDirEntry::SPtr> rawDir; /**< Directory of raw data tags
177 // * These may be of type
178 // * FIFF_DATA_BUFFER
179 // * FIFF_DATA_SKIP
180 // * FIFF_DATA_SKIP_SAMP
181 // * FIFF_NOP
182 // */
183 // int ndir; /**< Number of tags in the above directory. */
184 //} mneRawInfoRec, *mneRawInfo;
185 };
186 
187 //=============================================================================================================
188 // INLINE DEFINITIONS
189 //=============================================================================================================
190 } // NAMESPACE MNELIB
191 
192 #endif // MNERAWINFO_H
MNELIB::MneRawInfo::rawDir
QList< FIFFLIB::FiffDirEntry::SPtr > rawDir
Definition: mne_raw_info.h:146
MNELIB::MneRawInfo::lowpass
float lowpass
Definition: mne_raw_info.h:138
MNELIB::MneRawInfo::ndir
int ndir
Definition: mne_raw_info.h:153
FIFFLIB::_fiffIdRec
ToDo Old implementation use new fiff_id.h instead.
Definition: fiff_types_mne-c.h:214
MNELIB::MneRawInfo::coord_frame
int coord_frame
Definition: mne_raw_info.h:131
MNELIB::MneRawInfo::maxshield_data
int maxshield_data
Definition: mne_raw_info.h:145
MNELIB::MneRawInfo::filename
QString filename
Definition: mne_raw_info.h:127
FIFFLIB::FiffStream::SPtr
QSharedPointer< FiffStream > SPtr
Definition: fiff_stream.h:107
MNELIB::MneRawInfo::trans
FIFFLIB::FiffCoordTransOld * trans
Definition: mne_raw_info.h:134
MNELIB::MneRawInfo::nchan
int nchan
Definition: mne_raw_info.h:129
FIFFLIB::FiffDirNode::SPtr
QSharedPointer< FiffDirNode > SPtr
Definition: fiff_dir_node.h:76
MNESHARED_EXPORT
#define MNESHARED_EXPORT
Definition: mne_global.h:56
FIFFLIB::_fiffTimeRec
Definition: fiff_types_mne-c.h:182
fiff_stream.h
FiffStream class declaration.
MNELIB::MneRawInfo::chInfo
QList< FIFFLIB::FiffChInfo > chInfo
Definition: mne_raw_info.h:130
FIFFLIB::FiffCoordTransOld
Coordinate transformation descriptor.
Definition: fiff_coord_trans_old.h:80
MNELIB::MneRawInfo::sfreq
float sfreq
Definition: mne_raw_info.h:137
fiff_dir_node.h
FiffDirNode class declaration, which provides fiff dir tree processing methods.
MNELIB::MneRawInfo::id
FIFFLIB::fiffId id
Definition: mne_raw_info.h:128
MNELIB::MneRawInfo::buf_size
int buf_size
Definition: mne_raw_info.h:144
MNELIB::MneRawInfo::ConstSPtr
QSharedPointer< const MneRawInfo > ConstSPtr
Definition: mne_raw_info.h:84
MNELIB::MneRawInfo::SPtr
QSharedPointer< MneRawInfo > SPtr
Definition: mne_raw_info.h:83
MNELIB::MneRawInfo
Information about raw data in fiff file.
Definition: mne_raw_info.h:80
MNELIB::MneRawInfo::highpass
float highpass
Definition: mne_raw_info.h:139
fiff_coord_trans_old.h
FiffCoordTransOld class declaration.
MNELIB::MneRawInfo::start_time
FIFFLIB::fiffTimeRec start_time
Definition: mne_raw_info.h:140