Format-agnostic in-memory representation of a 3D MRI volume plus its slice decomposition. More...
#include "mri_global.h"#include "mri_types.h"#include <fiff/fiff_coord_trans.h>#include <QString>#include <QVector>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| struct | MRILIB::MriSlice |
| Single 2D MRI slice (pixels + slice→RAS transform) used as the volume's storage unit. More... | |
| class | MRILIB::MriVolData |
| Format-agnostic 3D MRI volume: header geometry, voxel buffer (as a vector of MriSlice), scan parameters and provenance. More... | |
Namespaces | |
| namespace | MRILIB |
| Volume I/O, voxel geometry and slice resampling for structural MRI data inside mne-cpp. | |
Format-agnostic in-memory representation of a 3D MRI volume plus its slice decomposition.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Two cooperating types live in this header:
FIFFV_MRI_PIXEL_* encoding) and an explicit slice-to-MRI (surface RAS) FIFFLIB::FiffCoordTrans. This is the unit the rendering pipeline and the COR.fif writer consume, so every loader (MGH, NIfTI, raw COR) ultimately decomposes its 3D buffer into a vector of these.voxToSurfRAS(), voxToTalairach() and inverse transforms derived from the MGH Mdc / c_ras header fields and any additional transforms attached by the source-file reader (e.g. talairach.xfm).The read() convenience method dispatches by file suffix to the matching loader (MriMghIO, MriNiftiIO, COR directory) so application code can stay one-liner clean irrespective of the on-disk format — the equivalent of nibabel.load() on the Python side.
Header reference: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/MghFormat Ported from mneMRIdataRec / mneMRIvolumeRec in MNE C (mne_types_mne-c.h) by Matti Hamalainen.
Definition in file mri_vol_data.h.