MNE-CPP  0.1.9
A Framework for Electrophysiology
fiff_constants.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef FIFF_CONSTANTS_H
38 #define FIFF_CONSTANTS_H
39 
40 //=============================================================================================================
41 // DEFINE NAMESPACE FIFFLIB
42 //=============================================================================================================
43 
44 namespace FIFFLIB
45 {
46 
47 //=============================================================================================================
48 // FIFF constants
49 //=============================================================================================================
50 
51 #define FIFFC_FAIL -1
52 #define FIFFC_OK 0
53 
54 #define FIFFV_TRUE 1
55 #define FIFFV_FALSE 0
56 
57 /* Compatibility definitions */
58 
59 #define FIFF_FAIL -1
60 #define FIFF_OK 0
61 
62 #define FIFFC_TAG_INFO_SIZE (sizeof(fiffTagRec) - sizeof(fiff_data_t *))
63 #define FIFFC_DATA_OFFSET FIFFC_TAG_INFO_SIZE
64 #define FIFFM_TAG_INFO(x) &((x)->kind)
65 
66 /*
67  * Quaternion channels for head position monitoring
68  */
69 #define FIFFV_QUAT_0 700
70 #define FIFFV_QUAT_1 701
71 #define FIFFV_QUAT_2 702
72 #define FIFFV_QUAT_3 703
73 #define FIFFV_QUAT_4 704
74 #define FIFFV_QUAT_5 705
75 #define FIFFV_QUAT_6 706
76 #define FIFFV_HPI_G 707
77 #define FIFFV_HPI_ERR 708
78 #define FIFFV_HPI_MOV 709
80 #define FIFFM_QUAT_CH(X) ((X >= FIFFV_QUAT_0) && (X <= FIFFV_HPI_MOV)) /* Check for a quaternion channel */
81 
82 #define FIFFV_DIPOLE_WAVE_CH 1000 /* Dipole time curve */
83 #define FIFFV_GOODNESS_FIT_CH 1001 /* Goodness of fit */
84 
85 #define FIFFM_CHPOS(x) &((x)->chpos)
86 
87 /*
88  * Units of measurement
89  */
90 #define FIFF_UNIT_NONE -1
91 
92 /*
93  * SI base units
94  */
95 #define FIFF_UNIT_M 1
96 #define FIFF_UNIT_KG 2
97 #define FIFF_UNIT_SEC 3
98 #define FIFF_UNIT_A 4
99 #define FIFF_UNIT_K 5
100 #define FIFF_UNIT_MOL 6
101 
102 /*
103  * SI Supplementary units
104  */
105 #define FIFF_UNIT_RAD 7
106 #define FIFF_UNIT_SR 8
107 
108 /*
109  * SI base candela
110  */
111 #define FIFF_UNIT_CD 9
112 
113 /*
114  * SI derived units
115  */
116 #define FIFF_UNIT_HZ 101
117 #define FIFF_UNIT_N 102
118 #define FIFF_UNIT_PA 103
119 #define FIFF_UNIT_J 104
120 #define FIFF_UNIT_W 105
121 #define FIFF_UNIT_C 106
122 #define FIFF_UNIT_V 107
123 #define FIFF_UNIT_F 108
124 #define FIFF_UNIT_OHM 109
125 #define FIFF_UNIT_MHO 110
126 #define FIFF_UNIT_WB 111
127 #define FIFF_UNIT_T 112
128 #define FIFF_UNIT_H 113
129 #define FIFF_UNIT_CEL 114
130 #define FIFF_UNIT_LM 115
131 #define FIFF_UNIT_LX 116
132 
133 /*
134  * Others we need
135  */
136 #define FIFF_UNIT_T_M 201 /* T/m */
137 #define FIFF_UNIT_AM 202 /* Am */
138 #define FIFF_UNIT_AM_M2 203 /* Am/m^2 */
139 #define FIFF_UNIT_AM_M3 204 /* Am/m^3 */
140 
141 /*
142  * Multipliers
143  */
144 #define FIFF_UNITM_E 18
145 #define FIFF_UNITM_PET 15
146 #define FIFF_UNITM_T 12
147 #define FIFF_UNITM_MEG 6
148 #define FIFF_UNITM_K 3
149 #define FIFF_UNITM_H 2
150 #define FIFF_UNITM_DA 1
151 #define FIFF_UNITM_NONE 0
152 #define FIFF_UNITM_D -1
153 #define FIFF_UNITM_C -2
154 #define FIFF_UNITM_M -3
155 #define FIFF_UNITM_MU -6
156 #define FIFF_UNITM_N -9
157 #define FIFF_UNITM_P -12
158 #define FIFF_UNITM_F -15
159 #define FIFF_UNITM_A -18
160 
161 /*
162  * Coil types
163  */
164 #define FIFFV_COIL_NONE 0
165 #define FIFFV_COIL_EEG 1
166 #define FIFFV_COIL_NM_122 2
167 #define FIFFV_COIL_NM_24 3
168 #define FIFFV_COIL_NM_MCG_AXIAL 4
169 #define FIFFV_COIL_EEG_BIPOLAR 5
170 #define FIFFV_COIL_DIPOLE 200
171 #define FIFFV_COIL_MCG_42 1000
172 #define FIFFV_COIL_POINT_MAGNETOMETER 2000
173 #define FIFFV_COIL_AXIAL_GRAD_5CM 2001
174 #define FIFFV_COIL_VV_PLANAR_W 3011
175 #define FIFFV_COIL_VV_PLANAR_T1 3012
176 #define FIFFV_COIL_VV_PLANAR_T2 3013
177 #define FIFFV_COIL_VV_PLANAR_T3 3014
178 #define FIFFV_COIL_VV_MAG_W 3021
179 #define FIFFV_COIL_VV_MAG_T1 3022
180 #define FIFFV_COIL_VV_MAG_T2 3023
181 #define FIFFV_COIL_VV_MAG_T3 3024
182 #define FIFFV_COIL_MAGNES_MAG 4001
183 #define FIFFV_COIL_MAGNES_GRAD 4002
184 #define FIFFV_COIL_CTF_GRAD 5001
185 #define FIFFV_COIL_CTF_REF_MAG 5002
186 #define FIFFV_COIL_CTF_REF_GRAD 5003
187 #define FIFFV_COIL_CTF_REF_GOFF 5004
188 #define FIFFV_COIL_KIT_GRAD 6001
189 #define FIFFV_COIL_KIT_REF_GRAD 6002
190 #define FIFFV_COIL_BABY_GRAD 7001
191 #define FIFFV_COIL_BABY_MAG 7002
192 #define FIFFV_COIL_BABY_REF_MAG 7003
193 #define FIFFV_COIL_BABY_REF_MAG2 7004
194 #define FIFFV_COIL_ARTEMIS123_GRAD 7501
195 #define FIFFV_COIL_ARTEMIS123_REF_MAG 7502
196 #define FIFFV_COIL_ARTEMIS123_REF_GRAD 7503
197 #define FIFFV_COIL_QUSPIN_ZFOPM_MAG 8001
198 #define FIFFV_COIL_KRISS_GRAD 9001
199 #define FIFFV_COIL_COMPUMEDICS_ADULT_GRAD 9101
200 #define FIFFV_COIL_COMPUMEDICS_PEDIATRIC_GRAD 9102
202 #define FIFFM_IS_VV_COIL(c) ((c)/1000 == 3)
203 
204 /*
205  * These are the cardinal points for MCG data
206  * Left and right are supposed to be located below the sternum point
207  */
208 #define FIFFV_POINT_CHEST_LEFT 1
209 #define FIFFV_POINT_CHEST_STERNUM 2
210 #define FIFFV_POINT_CHEST_RIGHT 3
211 
212 /*
213  * Coordinate transformation descriptor
214  */
215 #define FIFFV_COORD_UNKNOWN 0
216 #define FIFFV_COORD_DEVICE 1
217 #define FIFFV_COORD_ISOTRAK 2
218 #define FIFFV_COORD_HPI 3
219 #define FIFFV_COORD_HEAD 4
220 #define FIFFV_COORD_MRI 5
221 #define FIFFV_COORD_MRI_SLICE 6
222 #define FIFFV_COORD_MRI_DISPLAY 7
223 #define FIFFV_COORD_XRAY FIFF_COORD_MRI
224 #define FIFFV_COORD_XRAY_SLICE FIFF_COORD_MRI_SLICE
225 #define FIFFV_COORD_CT FIFF_COORD_MRI
226 #define FIFFV_COORD_CT_SLICE FIFF_COORD_MRI_SLICE
227 
228 #define FIFFV_COORD_DICOM_DEVICE 8
229 #define FIFFV_COORD_IMAGING_DEVICE 9
230 
231 #define FIFFV_COORD_TORSO 100
232 
233 #define FIFFV_MOVE 1
234 #define FIFFV_NO_MOVE 0
235 
236 /*
237  * Artefact removal parameters
238  */
239 #define FIFFV_ARTEF_MAX 100
240 #define FIFFV_ARTEF_NONE -1
241 #define FIFFV_ARTEF_KEEP 0
242 #define FIFFV_ARTEF_JUMP 1
243 #define FIFFV_ARTEF_NOJUMP 2
244 
245 /*
246  * The layered sphere model
247  */
248 #define FIFFV_LAYER_BRAIN 1
249 #define FIFFV_LAYER_CSF 2
250 #define FIFFV_LAYER_SKULL 3
251 #define FIFFV_LAYER_HEAD 4
252 
253 #define FIFFV_XFIT_MAP_SURF_SENSORS 0
254 #define FIFFV_XFIT_MAP_SURF_HEAD 1
255 #define FIFFV_XFIT_MAP_SURF_SPHERE 2
257 /*
258  * Pointers
259  */
260 #define FIFFV_NEXT_SEQ 0
261 #define FIFFV_NEXT_NONE -1
262 
263 /*
264  * Channel types
265  */
266 #define FIFFV_MAGN_CH 1
267 #define FIFFV_EL_CH 2
268 #define FIFFV_MEG_CH FIFFV_MAGN_CH
269 #define FIFFV_MCG_CH 201
270 #define FIFFV_REF_MEG_CH 301
271 #define FIFFV_EEG_CH FIFFV_EL_CH
272 #define FIFFV_STIM_CH 3
273 
274 #define FIFFV_EOG_CH 202
275 #define FIFFV_EMG_CH 302
276 #define FIFFV_ECG_CH 402
277 #define FIFFV_MISC_CH 502
278 #define FIFFV_RESP_CH 602
280 /*
281  * More of those defined in MNE
282  */
283 #define FIFFV_MNE_SURF_UNKNOWN -1
284 #define FIFFV_MNE_SURF_LEFT_HEMI 101
285 #define FIFFV_MNE_SURF_RIGHT_HEMI 102
286 
287 /*
288  * These relate to the Isotrak data
289  */
290 #define FIFFV_POINT_CARDINAL 1
291 #define FIFFV_POINT_HPI 2
292 #define FIFFV_POINT_EEG 3
293 #define FIFFV_POINT_ECG FIFFV_POINT_EEG
294 #define FIFFV_POINT_EXTRA 4
295 
296 #define FIFFV_POINT_LPA 1
297 #define FIFFV_POINT_NASION 2
298 #define FIFFV_POINT_RPA 3
299 
300 /*
301  * These are the MNE fiff definitions
302  */
303 #define FIFFB_MNE 350
304 #define FIFFB_MNE_SOURCE_SPACE 351
305 #define FIFFB_MNE_FORWARD_SOLUTION 352
306 #define FIFFB_MNE_PARENT_MRI_FILE 353
307 #define FIFFB_MNE_PARENT_MEAS_FILE 354
308 #define FIFFB_MNE_COV 355
309 #define FIFFB_MNE_INVERSE_SOLUTION 356
310 #define FIFFB_MNE_NAMED_MATRIX 357
311 #define FIFFB_MNE_ENV 358
312 #define FIFFB_MNE_BAD_CHANNELS 359
313 #define FIFFB_MNE_VERTEX_MAP 360
314 #define FIFFB_MNE_EVENTS 361
315 #define FIFFB_MNE_MORPH_MAP 362
316 
317 /*
318  * CTF compensation data
319  */
320 #define FIFFB_MNE_CTF_COMP 370
321 #define FIFFB_MNE_CTF_COMP_DATA 371
322 
323 /*
324  * Fiff tags associated with MNE computations (3500...)
325  * 3500... Bookkeeping
326  */
327 #define FIFF_MNE_ROW_NAMES 3502
328 #define FIFF_MNE_COL_NAMES 3503
329 #define FIFF_MNE_NROW 3504
330 #define FIFF_MNE_NCOL 3505
331 #define FIFF_MNE_COORD_FRAME 3506
332 //FIFFB_MNE_SOURCE_SPACE #define FIFFV_COORD_MRI
333 //FIFFB_MNE_FORWARD_SOLUTION FIFFV_COORD_HEAD
334 //FIFFB_MNE_INVERSE_SOLUTION FIFFV_COORD_HEAD
335 #define FIFF_MNE_CH_NAME_LIST 3507
336 #define FIFF_MNE_FILE_NAME 3508
338 /*
339  * 3510... 3590... Source space or surface
340  */
341 #define FIFF_MNE_SOURCE_SPACE_POINTS 3510
342 #define FIFF_MNE_SOURCE_SPACE_NORMALS 3511
343 #define FIFF_MNE_SOURCE_SPACE_NPOINTS 3512
344 #define FIFF_MNE_SOURCE_SPACE_SELECTION 3513
345 #define FIFF_MNE_SOURCE_SPACE_NUSE 3514
346 #define FIFF_MNE_SOURCE_SPACE_NEAREST 3515
347 #define FIFF_MNE_SOURCE_SPACE_NEAREST_DIST 3516
348 #define FIFF_MNE_SOURCE_SPACE_ID 3517
349 #define FIFF_MNE_SOURCE_SPACE_TYPE 3518
351 #define FIFF_MNE_SOURCE_SPACE_NTRI 3590
352 #define FIFF_MNE_SOURCE_SPACE_TRIANGLES 3591
353 #define FIFF_MNE_SOURCE_SPACE_NUSE_TRI 3592
354 #define FIFF_MNE_SOURCE_SPACE_USE_TRIANGLES 3593
356 #define FIFF_MNE_SOURCE_SPACE_VOXEL_DIMS 3596
357 #define FIFF_MNE_SOURCE_SPACE_INTERPOLATOR 3597
358 #define FIFF_MNE_SOURCE_SPACE_MRI_FILE 3598
360 #define FIFF_MNE_SOURCE_SPACE_DIST 3599
361 #define FIFF_MNE_SOURCE_SPACE_DIST_LIMIT 3600
363 /*
364  * 3520... Forward solution
365  */
366 #define FIFF_MNE_FORWARD_SOLUTION 3520
367 #define FIFF_MNE_SOURCE_ORIENTATION 3521
368 #define FIFF_MNE_INCLUDED_METHODS 3522
369 #define FIFF_MNE_FORWARD_SOLUTION_GRAD 3523
370 
371 /*
372  * 3530... Covariance matrix
373  */
374 #define FIFF_MNE_COV_KIND 3530
375 #define FIFF_MNE_COV_DIM 3531
376 #define FIFF_MNE_COV 3532
377 #define FIFF_MNE_COV_DIAG 3533
378 #define FIFF_MNE_COV_EIGENVALUES 3534
379 #define FIFF_MNE_COV_EIGENVECTORS 3535
380 #define FIFF_MNE_COV_NFREE 3536
382 /*
383  * 3540... Inverse operator
384  * We store the inverse operator as the eigenleads eigenfields and weights
385  */
386 #define FIFF_MNE_INVERSE_LEADS 3540
387 #define FIFF_MNE_INVERSE_LEADS_WEIGHTED 3546
388 #define FIFF_MNE_INVERSE_FIELDS 3541
389 #define FIFF_MNE_INVERSE_SING 3542
390 #define FIFF_MNE_PRIORS_USED 3543
391 #define FIFF_MNE_INVERSE_FULL 3544
392  // This matrix includes the whitening operator as well
393  // The regularization is applied
394 #define FIFF_MNE_INVERSE_SOURCE_ORIENTATIONS 3545
395  // The source orientations must be expressed in the coordinate system
396  // given by FIFF_MNE_COORD_FRAME
397 
398 /*
399  * 3550... Saved environment info
400  */
401 #define FIFF_MNE_ENV_WORKING_DIR 3550
402 #define FIFF_MNE_ENV_COMMAND_LINE 3551
404 /*
405  * 3560... Miscellaneous
406  */
407 #define FIFF_MNE_PROJ_ITEM_ACTIVE 3560
408 #define FIFF_MNE_EVENT_LIST 3561
409 #define FIFF_MNE_HEMI 3562
411 /*
412  * 3570... Morphing maps
413  */
414 #define FIFF_MNE_MORPH_MAP 3570
415 #define FIFF_MNE_MORPH_MAP_FROM 3571
416 #define FIFF_MNE_MORPH_MAP_TO 3572
418 /*
419  * 3580... CTF compensation data
420  */
421 #define FIFF_MNE_CTF_COMP_KIND 3580
422 #define FIFF_MNE_CTF_COMP_DATA 3581
423 #define FIFF_MNE_CTF_COMP_CALIBRATED 3582
425 /*
426  * 3700... Real-Time Communication
427  */
428 #define FIFF_MNE_RT_COMMAND 3700
429 #define FIFF_MNE_RT_CLIENT_ID 3701
431 /*
432  * 3710... Real-Time Blocks
433  */
434 #define FIFFB_MNE_RT_MEAS_INFO 3710
436 /*
437  * Fiff values associated with MNE computations
438  */
439 #define FIFFV_MNE_FIXED_ORI 1
440 #define FIFFV_MNE_FREE_ORI 2
441 
442 #define FIFFV_MNE_MEG 1
443 #define FIFFV_MNE_EEG 2
444 #define FIFFV_MNE_MEG_EEG 3
445 
446 #define FIFFV_MNE_UNKNOWN_COV 0
447 #define FIFFV_MNE_SENSOR_COV 1
448 #define FIFFV_MNE_NOISE_COV 1
449 #define FIFFV_MNE_SOURCE_COV 2
450 #define FIFFV_MNE_FMRI_PRIOR_COV 3
451 #define FIFFV_MNE_SIGNAL_COV 4
452 #define FIFFV_MNE_DEPTH_PRIOR_COV 5
453 #define FIFFV_MNE_ORIENT_PRIOR_COV 6
455 /*
456  * Source space types (values of FIFF_MNE_SOURCE_SPACE_TYPE)
457  */
458 #define FIFFV_MNE_SPACE_UNKNOWN -1
459 #define FIFFV_MNE_SPACE_SURFACE 1
460 #define FIFFV_MNE_SPACE_VOLUME 2
461 #define FIFFV_MNE_SPACE_DISCRETE 3
462 
463 /*
464  * Covariance matrix channel classification
465  */
466 #define FIFFV_MNE_COV_CH_UNKNOWN -1
467 #define FIFFV_MNE_COV_CH_MEG_MAG 0
468 #define FIFFV_MNE_COV_CH_MEG_GRAD 1
469 #define FIFFV_MNE_COV_CH_EEG 2
471 /*
472  * Projection item kinds
473  */
474 #define FIFFV_MNE_PROJ_ITEM_EEG_AVREF 10
475 
476 /*
477  * Additional coordinate frames
478  */
479 #define FIFFV_MNE_COORD_TUFTS_EEG 300
480 #define FIFFV_MNE_COORD_CTF_DEVICE 1001
481 #define FIFFV_MNE_COORD_CTF_HEAD 1004
482 #define FIFFV_MNE_COORD_MRI_VOXEL 2001
483 #define FIFFV_MNE_COORD_RAS 2002
484 #define FIFFV_MNE_COORD_MNI_TAL 2003
485 #define FIFFV_MNE_COORD_FS_TAL_GTZ 2004
486 #define FIFFV_MNE_COORD_FS_TAL_LTZ 2005
487 #define FIFFV_MNE_COORD_FS_TAL 2006
488 } // NAMESPACE
489 
490 #endif // FIFF_CONSTANTS_H