Numeric type codes, layout constants, and sentinel values shared by every MRI reader. More...

Go to the source code of this file.
Namespaces | |
| namespace | MRILIB |
| Volume I/O, voxel geometry and slice resampling for structural MRI data inside mne-cpp. | |
Variables | |
MGH Format Version | |
| constexpr int | MRILIB::MRI_MGH_VERSION = 1 |
MGH Voxel Data Types | |
Data type codes for voxels in MGH/MGZ files. From FreeSurfer mri.h and MNE C mne_types_mne-c.h. See: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat "type: data type of the image buffer; can be one of the following: UCHAR, SHORT, INT, or FLOAT (specified as 0, 4, 1, or 3, respectively)" | |
| constexpr int | MRILIB::MRI_UCHAR = 0 |
| constexpr int | MRILIB::MRI_INT = 1 |
| constexpr int | MRILIB::MRI_LONG = 2 |
| constexpr int | MRILIB::MRI_FLOAT = 3 |
| constexpr int | MRILIB::MRI_SHORT = 4 |
| constexpr int | MRILIB::MRI_BITMAP = 5 |
| constexpr int | MRILIB::MRI_TENSOR = 6 |
Frame Loading Constants | |
| constexpr int | MRILIB::MRI_ALL_FRAMES = -1 |
| constexpr int | MRILIB::MRI_NO_FRAMES = -2 |
MGH Header Constants | |
Fixed offsets and sizes in the MGH file header. See: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat | |
| constexpr int | MRILIB::MRI_MGH_DATA_OFFSET = 284 |
| constexpr int | MRILIB::MRI_MGH_HEADER_FIXED_SIZE = 30 |
MGH Footer Tag Types | |
Tag identifiers found in the MGH footer after the voxel data. From FreeSurfer tags.h. | |
| constexpr int | MRILIB::MGH_TAG_OLD_SURF_GEOM = 20 |
| constexpr int | MRILIB::MGH_TAG_OLD_MGH_XFORM = 30 |
| constexpr int | MRILIB::MGH_TAG_MGH_XFORM = 31 |
COR Slice Constants | |
Fixed dimensions for FreeSurfer COR slice files. COR files contain 256 coronal slices of 256×256 unsigned chars at 1mm isotropic. | |
| constexpr int | MRILIB::COR_NSLICE = 256 |
| constexpr int | MRILIB::COR_WIDTH = 256 |
| constexpr int | MRILIB::COR_HEIGHT = 256 |
| constexpr float | MRILIB::COR_PIXEL_SIZE = 1e-3f |
Numeric type codes, layout constants, and sentinel values shared by every MRI reader.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Centralises the four magic-number families that show up in every MGH/MGZ, COR and (indirectly) NIfTI reader so that the I/O classes themselves stay free of stray integer literals:
type field of the MGH header and to dispatch the corresponding QVector storage on the consumer side;Format reference: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat These constants originate from FreeSurfer's mri.h and were ported via MNE C's mne_types_mne-c.h by Matti Hamalainen.
Definition in file mri_types.h.