Reader for the legacy FreeSurfer COR-NNN per-slice volume layout (256 unsigned-char coronal slices on a 1 mm isotropic grid). More...


Go to the source code of this file.
Classes | |
| class | MRILIB::MriCorIO |
| Stateless reader for the FreeSurfer COR-NNN directory layout. More... | |
Namespaces | |
| namespace | MRILIB |
| Volume I/O, voxel geometry and slice resampling for structural MRI data inside mne-cpp. | |
Reader for the legacy FreeSurfer COR-NNN per-slice volume layout (256 unsigned-char coronal slices on a 1 mm isotropic grid).
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
COR is the directory-based volume format used by FreeSurfer before MGH became the default. A subject's mri/T1 (and historically mri/orig, mri/brain, ...) directory contains 256 files named COR-001 through COR-256, each a flat 65 536-byte (256\u00d7256 unsigned char) coronal slice. While modern FreeSurfer prefers MGH, COR-format trees still appear in legacy subject directories and in mne-c tutorial data, so mne-cpp must read them to keep round-trip parity with the original MNE C tooling.
The reader fans the 256 files into an MriSlice vector with the canonical coronal-to-surface-RAS coordinate transform:
which matches the convention emitted by make_cor_set() in the original mne_make_cor_set C tool and is what every downstream BEM / source-space builder in MNE-CPP expects.
Ported from make_cor_set() in MNE C mne_make_cor_set by Matti Hamalainen.
Definition in file mri_cor_io.h.