MNE-CPP  0.1.9
A Framework for Electrophysiology
fiff_explain.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef FIFF_EXPLAIN_H
38 #define FIFF_EXPLAIN_H
39 
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "fiff_types.h"
45 #include "fiff_file.h"
46 
47 //=============================================================================================================
48 // DEFINE NAMESPACE FIFFLIB
49 //=============================================================================================================
50 
51 namespace FIFFLIB
52 {
53 
54 //=============================================================================================================
55 // Explaination Type
56 //=============================================================================================================
57 
58 typedef struct {
59  int kind; /* What is this explanation good for? */
60  const char *text;
61 } _fiffExp;
62 
63 //=============================================================================================================
64 // DEFINE STATIC METHODS
65 //=============================================================================================================
66 
67 static _fiffExp _fiff_explanations[] = {
68  { FIFF_FILE_ID, "file ID " },
69  { FIFF_DIR_POINTER, "dir pointer " },
70  { FIFF_DIR, "directory " },
71  { FIFF_BLOCK_ID, "block ID " },
72  { FIFF_BLOCK_START, "{ " },
73  { FIFF_BLOCK_END, "} " },
74  { FIFF_FREE_LIST, "free list " },
75  { FIFF_FREE_BLOCK, "free block " },
76  { FIFF_NOP, "NOP " },
77  { FIFF_PARENT_FILE_ID, "parent FID " },
78  { FIFF_PARENT_BLOCK_ID, "parent BID " },
79  { FIFF_BLOCK_NAME, "block name " },
80 
81  { FIFF_NCHAN, "nchan " },
82  { FIFF_SFREQ, "sfreq " },
83  { FIFF_LINE_FREQ, "linefreq " },
84  { FIFF_DATA_PACK, "packing " },
85  { FIFF_CH_INFO, "channel " },
86  { FIFF_MEAS_DATE, "date " },
87  { FIFF_SUBJECT, "subject " },
88  { FIFF_COMMENT, "comment " },
89  { FIFF_EVENT_COMMENT, "event comment " },
90  { FIFF_NAVE, "nave " },
91  { FIFF_FIRST_SAMPLE, "firstsamp " },
92  { FIFF_LAST_SAMPLE, "lastsamp " },
93  { FIFF_NO_SAMPLES, "nsamp " },
94  { FIFF_FIRST_TIME, "time minimum " },
95  { FIFF_ASPECT_KIND, "aspect type " },
96  { FIFF_REF_EVENT, "ref. event " },
97  { FIFF_EXPERIMENTER, "scientist " },
98  { FIFF_DIG_POINT, "dig. point " },
99  { FIFF_DIG_STRING, "dig. string " },
100  { FIFF_CH_POS, "channel pos " },
101  { FIFF_CH_CALS_VEC, "channel cals " },
102  { FIFF_REQ_EVENT, "req. event " },
103  { FIFF_REQ_LIMIT, "req. limit " },
104  { FIFF_LOWPASS, "lowpass " },
105  { FIFF_HIGHPASS, "highpass " },
106  { FIFF_BAD_CHS, "bad chs " },
107  { FIFF_ARTEF_REMOVAL, "artefacts " },
108  { FIFF_COORD_TRANS, "transform " },
109  { FIFF_SUBAVE_SIZE, "subave size " },
110  { FIFF_SUBAVE_FIRST, "subave first " },
111  { FIFF_NAME, "block name " },
112  { FIFF_HPI_BAD_CHS, "HPI bad chs " },
113  { FIFF_HPI_CORR_COEFF, "HPI cor coef " },
114 
115  { FIFF_HPI_SLOPES, "HPI slopes " },
116  { FIFF_HPI_NCOIL, "HPI # coils " },
117  { FIFF_HPI_COIL_MOMENTS, "HPI moments " },
118  { FIFF_HPI_FIT_GOODNESS, "HPI g-values " },
119  { FIFF_HPI_FIT_ACCEPT, "HPI fit accept " },
120  { FIFF_HPI_FIT_GOOD_LIMIT,"HPI g limit " },
121  { FIFF_HPI_FIT_DIST_LIMIT,"HPI dist limit " },
122  { FIFF_HPI_COIL_NO, "HPI coil no" },
123 
124  { FIFF_DATA_BUFFER, "data buffer " },
125  { FIFF_DATA_SKIP, "data skip " },
126  { FIFF_EPOCH, "epoch " },
127 
128  { FIFF_SUBJ_ID, "subject id " },
129  { FIFF_SUBJ_FIRST_NAME, "first name " },
130  { FIFF_SUBJ_MIDDLE_NAME,"middle name " },
131  { FIFF_SUBJ_LAST_NAME, "last name " },
132  { FIFF_SUBJ_BIRTH_DAY, "birthday " },
133  { FIFF_SUBJ_SEX, "sex " },
134  { FIFF_SUBJ_HAND, "handedness " },
135  { FIFF_SUBJ_WEIGHT, "weight " },
136  { FIFF_SUBJ_HEIGHT, "height " },
137  { FIFF_SUBJ_COMMENT, "comment " },
138 
139  { FIFF_PROJ_ID, "project id " },
140  { FIFF_PROJ_NAME, "proj. name " },
141  { FIFF_PROJ_AIM, "project aim " },
142  { FIFF_PROJ_PERSONS, "proj. pers. " },
143  { FIFF_PROJ_COMMENT, "proj. comm. " },
144 
145  { FIFF_EVENT_CHANNELS, "event ch #'s " },
146  { FIFF_EVENT_LIST, "event list" },
147 
148  { FIFF_MRI_SOURCE_PATH, "MRI source " },
149  { FIFF_MRI_SOURCE_FORMAT, "MRI src fmt " },
150  { FIFF_MRI_PIXEL_ENCODING, "pixel type " },
151  { FIFF_MRI_PIXEL_DATA_OFFSET, "pixel offset " },
152  { FIFF_MRI_PIXEL_SCALE, "pixel scale " },
153  { FIFF_MRI_PIXEL_DATA, "pixel data " },
154  { FIFF_MRI_PIXEL_OVERLAY_DATA, "overlay data " },
155  { FIFF_MRI_PIXEL_OVERLAY_ENCODING, "overlay type " },
156  { FIFF_MRI_ORIG_SOURCE_PATH, "MRI orig source" },
157  { FIFF_MRI_ORIG_SOURCE_FORMAT, "MRI orig format" },
158  { FIFF_MRI_ORIG_PIXEL_ENCODING, "MRI opixel type" },
159  { FIFF_MRI_ORIG_PIXEL_DATA_OFFSET, "MRI opixel offs" },
160 
161  { FIFF_MRI_WIDTH, "pixel width " },
162  { FIFF_MRI_WIDTH_M, "real width " },
163  { FIFF_MRI_HEIGHT, "pixel height " },
164  { FIFF_MRI_HEIGHT_M, "real height " },
165  { FIFF_MRI_DEPTH, "pixel depth " },
166  { FIFF_MRI_DEPTH_M, "real depth " },
167  { FIFF_MRI_THICKNESS, "slice thickness" },
168 
169  { FIFF_SPHERE_ORIGIN, "sphere orig. " },
170  { FIFF_SPHERE_COORD_FRAME, "sphere coord fr" },
171  { FIFF_SPHERE_LAYERS, "sphere layers " },
172 
173  { FIFF_BEM_SURF_ID, "surface id " },
174  { FIFF_BEM_SURF_NAME, "surface name " },
175  { FIFF_BEM_SURF_NNODE, "surf. nnode " },
176  { FIFF_BEM_SURF_NTRI, "surface ntri " },
177  { FIFF_BEM_SURF_NODES, "surf. nodes " },
178  { FIFF_BEM_SURF_TRIANGLES, "surf. triang " },
179  { FIFF_BEM_SURF_NORMALS, "surf. normals " },
180  { FIFF_BEM_SURF_CURVS, "surf. curv. vec" },
181  { FIFF_BEM_SURF_CURV_VALUES, "surf. curv. val" },
182  { FIFF_BEM_APPROX, "BEM method " },
183  { FIFF_BEM_POT_SOLUTION, "BEM pot. sol. " },
184 
185  { FIFF_SOURCE_DIPOLE, "source dipole " },
186  { FIFF_XFIT_LEAD_PRODUCTS, "xfit leadpro " },
187  { FIFF_XFIT_MAP_PRODUCTS, "xfit mapprod " },
188  { FIFF_XFIT_GRAD_MAP_PRODUCTS, "xfit gmappro " },
189  { FIFF_XFIT_VOL_INTEGRATION, "xfit volint " },
190  { FIFF_XFIT_INTEGRATION_RADIUS, "xfit intrad " },
191 
192  { FIFF_PROJ_ITEM_KIND, "proj item kind " },
193  { FIFF_PROJ_ITEM_TIME, "proj item time " },
194  { FIFF_PROJ_ITEM_IGN_CHS, "proj item ign " },
195  { FIFF_PROJ_ITEM_NVEC, "proj nvec " },
196  { FIFF_PROJ_ITEM_VECTORS, "proj item vect " },
197  { FIFF_PROJ_ITEM_COMMENT, "comment " },
198  { FIFF_PROJ_ITEM_CH_NAME_LIST, "proj item chs " },
199 
200  { FIFF_VOL_ID, "volume id " },
201  { FIFF_VOL_NAME, "volume name " },
202  { FIFF_VOL_OWNER_ID, "volume uid " },
203  { FIFF_VOL_OWNER_NAME, "volume uname " },
204  { FIFF_VOL_OWNER_REAL_NAME, "vol. urname " },
205  { FIFF_VOL_TYPE, "volume type " },
206  { FIFF_VOL_HOST, "volume host " },
207  { FIFF_VOL_MOUNT_POINT, "volume mntpt " },
208  { FIFF_VOL_BLOCKS, "vol. blocks " },
209  { FIFF_VOL_AVAIL_BLOCKS, "vol. ablocks " },
210  { FIFF_VOL_FREE_BLOCKS, "vol. fblocks " },
211  { FIFF_VOL_BLOCK_SIZE, "volume bsize " },
212  { FIFF_VOL_REAL_ROOT, "volume rroot " },
213  { FIFF_VOL_SYMBOLIC_ROOT, "volume sroot " },
214  { FIFF_VOL_DIRECTORY, "volume dir " },
215  { FIFF_INDEX, "index " },
216  { FIFF_INDEX_KIND, "index kind " },
217  { FIFF_DACQ_PARS, "acq. pars. " },
218  { FIFF_DACQ_STIM, "acq. stim seq. " },
219  { -1,NULL} };
220 
221 //=============================================================================================================
222 
223 static _fiffExp _fiff_block_explanations[] = {
224  { FIFFB_ROOT, "root " },
225  { FIFFB_MEAS, "measurement " },
226  { FIFFB_MEAS_INFO, "meas. info " },
227  { FIFFB_RAW_DATA, "raw data " },
228  { FIFFB_PROCESSED_DATA, "proc. data " },
229  { FIFFB_EVOKED, "evoked data " },
230  { FIFFB_ASPECT, "data aspect " },
231  { FIFFB_SUBJECT, "subject " },
232  { FIFFB_ISOTRAK, "isotrak " },
233  { FIFFB_HPI_MEAS, "HPI meas " },
234  { FIFFB_HPI_RESULT, "HPI result " },
235  { FIFFB_HPI_COIL, "HPI coil " },
236  { FIFFB_PROJECT, "project " },
237  { FIFFB_CONTINUOUS_DATA,"cont. data " },
238  { FIFFB_VOID, "anything " },
239  { FIFFB_EVENTS, "events " },
240  { FIFFB_DACQ_PARS, "acq. pars. " },
241  { FIFFB_MRI, "MRI data " },
242  { FIFFB_MRI_SET, "MRI set " },
243  { FIFFB_MRI_SLICE, "MRI slice " },
244  { FIFFB_MRI_SCENERY, "MRI scenery " },
245  { FIFFB_MRI_SCENE, "MRI scene " },
246  { FIFFB_SPHERE, "Sphere mod. " },
247  { FIFFB_BEM, "BEM data " },
248  { FIFFB_BEM_SURF, "BEM surf " },
249  { FIFFB_XFIT_AUX, "xfit aux " },
250  { FIFFB_XFIT_PROJ, "projection " },
251  { FIFFB_XFIT_PROJ_ITEM, "proj. item " },
252  { FIFFB_VOL_INFO, "volume info " },
253  { FIFFB_INDEX, "index " },
254  { -1, NULL} };
255 
256 //=============================================================================================================
257 
258 static _fiffExp _fiff_unit_explanations[] = {
259  /*
260  * SI base units
261  */
262  { FIFF_UNIT_M, "m" },
263  { FIFF_UNIT_KG,"kg" },
264  { FIFF_UNIT_SEC, "s" },
265  { FIFF_UNIT_A, "A" },
266  { FIFF_UNIT_K, "K" },
267  { FIFF_UNIT_MOL, "mol" },
268  /*
269  * SI Supplementary units
270  */
271  { FIFF_UNIT_RAD, "rad" },
272  { FIFF_UNIT_SR,"sr" },
273  /*
274  * SI derived units
275  */
276  { FIFF_UNIT_HZ,"Hz" },
277  { FIFF_UNIT_N, "N" },
278  { FIFF_UNIT_PA,"Pa" },
279  { FIFF_UNIT_J, "J" },
280  { FIFF_UNIT_W, "W" },
281  { FIFF_UNIT_C, "C" },
282  { FIFF_UNIT_V, "V" },
283  { FIFF_UNIT_F, "F" },
284  { FIFF_UNIT_OHM, "ohm" },
285  { FIFF_UNIT_MHO, "S" },
286  { FIFF_UNIT_WB,"Wb" },
287  { FIFF_UNIT_T, "T" },
288  { FIFF_UNIT_H, "H" },
289  { FIFF_UNIT_CEL, "C" },
290  { FIFF_UNIT_LM,"lm" },
291  { FIFF_UNIT_LX,"lx" },
292  /*
293  * Others we need
294  */
295  { FIFF_UNIT_T_M,"T/m" }, /* T/m */
296  { -1, NULL }};
297 
298 static _fiffExp _fiff_unit_mul_explanations[] = {
299  { FIFF_UNITM_E, "E" },
300  { FIFF_UNITM_PET, "P" },
301  { FIFF_UNITM_T, "T" },
302  { FIFF_UNITM_MEG, "M" },
303  { FIFF_UNITM_K, "k" },
304  { FIFF_UNITM_H, "h" },
305  { FIFF_UNITM_DA,"da" },
306  { FIFF_UNITM_NONE, "" },
307  { FIFF_UNITM_D, "d" },
308  { FIFF_UNITM_C, "c" },
309  { FIFF_UNITM_M, "m" },
310  { FIFF_UNITM_MU,"u" },
311  { FIFF_UNITM_N, "n" },
312  { FIFF_UNITM_P, "p" },
313  { FIFF_UNITM_F, "f" },
314  { FIFF_UNITM_A, "a" },
315  {-1, NULL }};
316 } // NAMESPACE
317 
318 #endif // FIFF_EXPLAIN_H
#define FIFF_SUBJ_ID
Definition: fiff_file.h:565
#define FIFF_SPHERE_COORD_FRAME
Definition: fiff_file.h:729
#define FIFF_DIG_POINT
Definition: fiff_file.h:466
#define FIFF_PROJ_ID
Definition: fiff_file.h:577
#define FIFF_LINE_FREQ
Definition: fiff_file.h:489
Old fiff_type declarations - replace them.
#define FIFF_FIRST_SAMPLE
Definition: fiff_file.h:461
#define FIFF_VOL_REAL_ROOT
Definition: fiff_file.h:858
#define FIFF_PROJ_PERSONS
Definition: fiff_file.h:580
#define FIFF_HPI_SLOPES
Definition: fiff_file.h:468
#define FIFF_HPI_BAD_CHS
Definition: fiff_file.h:478
#define FIFF_EPOCH
Definition: fiff_file.h:560
#define FIFF_COMMENT
Definition: fiff_file.h:459
#define FIFF_BEM_SURF_TRIANGLES
Definition: fiff_file.h:739
#define FIFF_SPHERE_LAYERS
Definition: fiff_file.h:730
#define FIFF_BEM_SURF_NNODE
Definition: fiff_file.h:736
#define FIFF_VOL_OWNER_NAME
Definition: fiff_file.h:854
#define FIFF_VOL_BLOCK_SIZE
Definition: fiff_file.h:864
#define FIFF_BEM_SURF_CURV_VALUES
Definition: fiff_file.h:742
#define FIFF_NAVE
Definition: fiff_file.h:460
#define FIFF_EVENT_COMMENT
Definition: fiff_file.h:480
Header file describing the numerical values used in fif files.
#define FIFF_BEM_APPROX
Definition: fiff_file.h:745
#define FIFF_HPI_COIL_MOMENTS
Definition: fiff_file.h:500
#define FIFF_BEM_SURF_ID
Definition: fiff_file.h:734
#define FIFF_VOL_FREE_BLOCKS
Definition: fiff_file.h:862
#define FIFFB_MRI_SET
Definition: fiff_file.h:391
#define FIFF_HPI_CORR_COEFF
Definition: fiff_file.h:479
#define FIFF_REQ_LIMIT
Definition: fiff_file.h:471
#define FIFF_NO_SAMPLES
Definition: fiff_file.h:481
#define FIFF_VOL_OWNER_REAL_NAME
Definition: fiff_file.h:855
#define FIFF_CH_INFO
Definition: fiff_file.h:456
#define FIFF_NCHAN
Definition: fiff_file.h:453
#define FIFF_BAD_CHS
Definition: fiff_file.h:473
#define FIFF_ARTEF_REMOVAL
Definition: fiff_file.h:474
#define FIFF_VOL_OWNER_ID
Definition: fiff_file.h:853
#define FIFFB_MRI_SLICE
Definition: fiff_file.h:392
#define FIFF_PROJ_COMMENT
Definition: fiff_file.h:581
#define FIFF_SUBJ_COMMENT
Definition: fiff_file.h:574
#define FIFF_PROJ_NAME
Definition: fiff_file.h:578
#define FIFF_NAME
Definition: fiff_file.h:485
#define FIFF_EVENT_CHANNELS
Definition: fiff_file.h:596
#define FIFF_VOL_DIRECTORY
Definition: fiff_file.h:865
#define FIFF_HPI_FIT_GOOD_LIMIT
Definition: fiff_file.h:503
#define FIFFB_BEM
Definition: fiff_file.h:403
#define FIFF_DATA_PACK
Definition: fiff_file.h:455
#define FIFF_HPI_NCOIL
Definition: fiff_file.h:469
#define FIFF_HIGHPASS
Definition: fiff_file.h:476
#define FIFF_LAST_SAMPLE
Definition: fiff_file.h:462
#define FIFFB_MRI
Definition: fiff_file.h:390
#define FIFF_SFREQ
Definition: fiff_file.h:454
#define FIFF_BEM_POT_SOLUTION
Definition: fiff_file.h:744
#define FIFF_SUBAVE_FIRST
Definition: fiff_file.h:484
#define FIFF_REQ_EVENT
Definition: fiff_file.h:470
#define FIFF_BEM_SURF_CURVS
Definition: fiff_file.h:741
#define FIFFB_MRI_SCENE
Definition: fiff_file.h:394
#define FIFF_SUBJ_MIDDLE_NAME
Definition: fiff_file.h:567
#define FIFFB_BEM_SURF
Definition: fiff_file.h:404
#define FIFF_BEM_SURF_NTRI
Definition: fiff_file.h:737
#define FIFF_MEAS_DATE
Definition: fiff_file.h:457
#define FIFF_ASPECT_KIND
Definition: fiff_file.h:463
#define FIFF_SUBJ_SEX
Definition: fiff_file.h:570
#define FIFFB_XFIT_PROJ
Definition: fiff_file.h:406
#define FIFF_HPI_FIT_DIST_LIMIT
Definition: fiff_file.h:504
#define FIFF_COORD_TRANS
Definition: fiff_file.h:475
#define FIFF_DATA_SKIP
Definition: fiff_file.h:559
#define FIFF_DATA_BUFFER
Definition: fiff_file.h:558
#define FIFF_VOL_SYMBOLIC_ROOT
Definition: fiff_file.h:859
#define FIFF_SUBJ_BIRTH_DAY
Definition: fiff_file.h:569
#define FIFF_VOL_MOUNT_POINT
Definition: fiff_file.h:860
#define FIFF_FIRST_TIME
Definition: fiff_file.h:482
#define FIFF_SUBAVE_SIZE
Definition: fiff_file.h:483
#define FIFF_BEM_SURF_NORMALS
Definition: fiff_file.h:740
#define FIFF_DIG_STRING
Definition: fiff_file.h:487
#define FIFFB_XFIT_AUX
Definition: fiff_file.h:408
#define FIFF_HPI_COIL_NO
Definition: fiff_file.h:505
#define FIFF_HPI_FIT_ACCEPT
Definition: fiff_file.h:502
#define FIFF_SUBJ_HEIGHT
Definition: fiff_file.h:573
#define FIFF_VOL_TYPE
Definition: fiff_file.h:856
#define FIFF_VOL_BLOCKS
Definition: fiff_file.h:861
#define FIFF_SUBJECT
Definition: fiff_file.h:458
#define FIFF_PROJ_AIM
Definition: fiff_file.h:579
#define FIFF_CH_POS
Definition: fiff_file.h:524
#define FIFFB_MRI_SCENERY
Definition: fiff_file.h:393
#define FIFF_LOWPASS
Definition: fiff_file.h:472
#define FIFFB_SPHERE
Definition: fiff_file.h:402
#define FIFF_SUBJ_WEIGHT
Definition: fiff_file.h:572
#define FIFF_REF_EVENT
Definition: fiff_file.h:464
#define FIFF_BEM_SURF_NAME
Definition: fiff_file.h:735
#define FIFF_EVENT_LIST
Definition: fiff_file.h:597
#define FIFF_VOL_AVAIL_BLOCKS
Definition: fiff_file.h:863
#define FIFF_SUBJ_FIRST_NAME
Definition: fiff_file.h:566
#define FIFF_VOL_HOST
Definition: fiff_file.h:857
#define FIFF_SUBJ_HAND
Definition: fiff_file.h:571
#define FIFF_BEM_SURF_NODES
Definition: fiff_file.h:738
#define FIFF_SUBJ_LAST_NAME
Definition: fiff_file.h:568
#define FIFFB_XFIT_PROJ_ITEM
Definition: fiff_file.h:407
#define FIFF_EXPERIMENTER
Definition: fiff_file.h:465
#define FIFF_CH_CALS_VEC
Definition: fiff_file.h:477
#define FIFF_HPI_FIT_GOODNESS
Definition: fiff_file.h:501