v2.0.0
Loading...
Searching...
No Matches
mri_cor_fif_io.cpp File Reference

Implementation of MRILIB::MriCorFifIO: block-and-tag serialiser that emits a FIFF MRI set from an in-memory MriVolData. More...

#include "mri_cor_fif_io.h"
#include <fiff/fiff_stream.h>
#include <fiff/fiff_tag.h>
#include <fiff/fiff_coord_trans.h>
#include <fiff/fiff_file.h>
#include <fiff/fiff_constants.h>
#include <QFile>
#include <QDebug>
#include <Eigen/Core>
Include dependency graph for mri_cor_fif_io.cpp:

Go to the source code of this file.

Detailed Description

Implementation of MRILIB::MriCorFifIO: block-and-tag serialiser that emits a FIFF MRI set from an in-memory MriVolData.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
February 2026

Drives a FIFFLIB::FiffStream through the nested FIFFB_MRI / FIFFB_MRI_SET / FIFFB_MRI_SLICE block hierarchy declared in the header. For each slice it writes the geometry tags (FIFF_MRI_WIDTH / FIFF_MRI_HEIGHT and their metric counterparts), the slice\u2192MRI coordinate transform, the pixel-encoding selector, and the raw pixel buffer in the source's native FIFFV_MRI_PIXEL_BYTE / _WORD / _FLOAT encoding so reads through the FIFF toolchain reproduce the original sample-level data without quantisation drift. Ported from save_slices() / write_slice() in MNE C write_mri_set.c by Matti Hamalainen.

Definition in file mri_cor_fif_io.cpp.