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