Evidence · LARMORX

NIfTI I/O

LARMORX reads and writes NIfTI-1 and NIfTI-2 images with its own code in Rust, compared with nibabel 5.4.2 on the files of 41 OpenNeuro datasets, fMRIPrep’s derivatives, templates and two test suites. In 166 of its 235 compared cases, out of 257, it reads every value, header field and matrix as nibabel does, and nibabel reads back what it writes. In the other 69 the data and every header field are the same and only the matrices differ, by at most 4.2 × 10⁻¹³ mm, where nibabel computes the qform in numpy’s 80-bit long double on Linux x86-64 (NIB-04). In 5 more, one library reads a file the other refuses: RGB data, which LARMORX does not read yet, files whose compression does not match their name, and a single file with vox_offset 0. On one thread it reads a gzipped file in 1.0 to 6.0 times less time than nibabel (6.0 on the smallest file).

Code
LARMORX's own, not a port: crate larmorx-io, lx.load, lx.save, lx.Image, in larmorx (Apache-2.0)
Status
validated (marked before the statuses' definition)
Records
standard comparison (nibabel 5.4.2) · benchmark nifti-io
Reference
API page io

What is compared

Every LARMORX program reads and writes images through it: NIfTI-1 and NIfTI-2, single files and header/image pairs, compressed or not, every data type nibabel reads but RGB, with scaling, the qform and sform, and compressed writing on several threads. It is LARMORX’s own code, not a port, so it is compared with nibabel by its name, never as an original; its verdicts say “nibabel’s own variability” where other pages say “the original’s”.

python
import larmorx as lx

img = lx.load("sub-01_T1w.nii.gz")          # lx.Image: data, affine, header
lx.save(img, "copy.nii.gz", n_threads=4)

The API page describes every function and option. How to read what follows: how to read the evidence.

The verdicts at a glance

Agreement, LARMORX’s own reader and writer against nibabel 5.4.2 (standard comparison, 257 cases of the record), by category and verdict
OpenNeuro datasets86
fMRIPrep derivatives17
TemplateFlow templates15
ITK test data16
nibabel test data11
synthetic: data types26
synthetic: header fields9
synthetic: file layouts12
synthetic: malformed files12
synthetic: orientations23
synthetic: scale factors15
synthetic: shapes13
synthetic: transform images2

Select a segment to list its cases below.

The record reads each file with both libraries in every mode nibabel offers: its default array, get_fdata in double and single precision, memory-mapped, and the stored values. It compares their header fields, extensions, shape, voxel sizes, scale factors and matrices. Then LARMORX writes the file and nibabel reads it back.

  • The 17 files both refuse are corrupt or malformed.
  • The 5 expected divergences are RGB data (not supported yet), files whose compression does not match their name (LARMORX reads them by their content), and a single file with vox_offset 0 (refused; nibabel reads its header as data).
  • In the 69 files whose matrices differ, nibabel’s own matrices change with the platform: computed in double, as nibabel computes them where long double is 64 bits (macOS on Apple silicon, Windows), they are LARMORX’s bit for bit (NIB-04).

Real files, field by field

Two files of the record: a raw BOLD run as OpenNeuro publishes it, and fMRIPrep’s preprocessed output of the same run, which nibabel wrote with a scale factor and an intercept.

Every header field and the data, LARMORX’s own reader against nibabel 5.4.2: ds000005 sub-01 BOLD, run 1 (raw, as published)

FieldnibabelLARMORX's ownVerdict
magic“n+1”the same
dim_info0the same
dim4, 64, 64, 34, 240, 1, 1, 1the same
intent_p10.0the same
intent_p20.0the same
intent_p30.0the same
intent_code0the same
datatype4the same
bitpix16the same
slice_start0the same
pixdim-1.0, 3.125, 3.125, 4.0, 2.0, 0.0, 0.0, 0.0the same
scl_slope1.0the same
scl_inter0.0the same
slice_end0the same
slice_code0the same
xyzt_units10the same
cal_max1353.0the same
cal_min0.0the same
slice_duration0.0the same
toffset0.0the same
descrip“FSL4.0”the same
aux_file“”the same
qform_code1the same
sform_code1the same
quatern_b0.0the same
quatern_c-1.0the same
quatern_d0.0the same
qoffset_x101.0the same
qoffset_y-72.0the same
qoffset_z-99.0the same
srow_x-3.125, 0.0, 0.0, 101.0the same
srow_y0.0, 3.125, 0.0, -72.0the same
srow_z0.0, 0.0, 4.0, -99.0the same
intent_name“”the same
data_type“”the same
db_name“”the same
extents0the same
session_error0the same
regular“r”the same
glmax0the same
glmin0the same
the 41 header fieldsas storedevery one the sameBit-identical
data (each reader’s default)int16, 64×64×34×240the same values, bit for bit (SHA-256 9409383ceba0)Bit-identical
affine (the one each reader uses)qform/sform code 1/1max |Δ| 0 mmBit-identical
qform and sform matricesfrom the quaternion; as storedequalBit-identical
the header, written back348 bytesbyte for byteBit-identical
LARMORX writes the image; nibabel reads itdata and affinethe same data, affine equalBit-identical

sub-01_task-mixedgamblestask_run-01_bold.nii.gz (/openneuro/ds000005/sub-01/func/sub-01_task-mixedgamblestask_run-01_bold.nii.gz). The header fields as stored (nibabel’s header class on the file’s first bytes); the data in nibabel’s default read; the affine is the matrix each library gives (nibabel computes a qform in numpy’s long double, 80-bit on Linux x86-64, 64-bit on macOS on Apple silicon and Windows; LARMORX in double everywhere).

Every header field and the data, LARMORX’s own reader against nibabel 5.4.2: fMRIPrep’s preprocessed BOLD of the same run (written by nibabel)

FieldnibabelLARMORX's ownVerdict
magic“n+1”the same
dim_info0the same
dim4, 64, 64, 34, 240, 1, 1, 1the same
intent_p10.0the same
intent_p20.0the same
intent_p30.0the same
intent_code0the same
datatype4the same
bitpix16the same
slice_start0the same
pixdim-1.0, 3.125, 3.125, 4.0, 2.0, 1.0, 1.0, 1.0the same
scl_slope0.020302731543779373the same
scl_inter665.2799072265625the same
slice_end0the same
slice_code0the same
xyzt_units10the same
cal_max1330.53955078125the same
cal_min0.0the same
slice_duration0.0the same
toffset0.0the same
descrip“xform matrices modified by FixHeaderApplyTransforms (niworkflows v1.4.5).”the same
aux_file“”the same
qform_code1the same
sform_code1the same
quatern_b0.0the same
quatern_c1.0the same
quatern_d0.0the same
qoffset_x101.0the same
qoffset_y-72.0the same
qoffset_z-99.0the same
srow_x-3.125, 0.0, 0.0, 101.0the same
srow_y0.0, 3.125, 0.0, -72.0the same
srow_z0.0, 0.0, 4.0, -99.0the same
intent_name“”the same
data_type“”the same
db_name“”the same
extents0the same
session_error0the same
regular“r”the same
glmax0the same
glmin0the same
the 41 header fieldsas storedevery one the sameBit-identical
data (each reader’s default)float64, 64×64×34×240the same values, bit for bit (SHA-256 771f35d30475)Bit-identical
affine (the one each reader uses)qform/sform code 1/1max |Δ| 0 mmBit-identical
qform and sform matricesfrom the quaternion; as storedequalBit-identical
the header, written back348 bytesbyte for byteBit-identical
LARMORX writes the image; nibabel reads itdata and affinethe same data, affine equalBit-identical

sub-01_task-mixedgamblestask_run-1_desc-preproc_bold.nii.gz (/openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_bold.nii.gz). The header fields as stored (nibabel’s header class on the file’s first bytes); the data in nibabel’s default read; the affine is the matrix each library gives (nibabel computes a qform in numpy’s long double, 80-bit on Linux x86-64, 64-bit on macOS on Apple silicon and Windows; LARMORX in double everywhere).

Every case

Each file of the record, with what it is, its verdict and the reason. Search, filter by source or verdict (or select a segment of the chart above), sort by a column; #case=<path> links to one.

257 cases

CaseCategoryWhat it testsVerdictChecks
itk/Modules/IO/NIFTI/test/Input/ChickenEgg-zeros.nii.gzITK test dataReal 128x128x95 acquisition of a chicken egg (0.87x0.87x0.80 mm, data zeroed) with qform_code 0 / sform_code 2 whose qu…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Modules/IO/NIFTI/test/Input/SlopeInterceptUCHAR.nii.gzITK test datauint8 16x5x16 with scl_slope 2 and scl_inter 1.23456, qform_code 1 / sform_code 0, LPS storage order: scaled 8-bit data…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
itk/Modules/IO/NIFTI/test/Input/SmallVoxels.nii.gzITK test data100x120x9 float64 with microscopic voxels (0.001x0.001x0.0302 mm), oblique (~0.35 rad), qform=sform=1, raw scl_slope 0 …Within nibabel's own variability

data and every header field equal; the matrices within 3.5e-18 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
itk/Modules/IO/NIFTI/test/Input/SmallVoxelsNonOrthoSform.nii.gzITK test dataSmallVoxels with a slightly non-orthogonal sform and qform_code 0.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Modules/IO/NIFTI/test/Input/SmallVoxels_AffinePrecision.nii.gzITK test data5x7x6 float64 at 0.3 mm converted by mnc2nii, sform only (qform_code 0, but quatern fields filled): ITK's affine-precis…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Modules/IO/NIFTI/test/Input/SmallVoxels_noqform.nii.gzITK test dataSmallVoxels with qform_code 0 (sform only).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Modules/IO/NIFTI/test/Input/SmallVoxels_nosform.nii.gzITK test dataSmallVoxels with sform_code 0 (qform only).Within nibabel's own variability

data and every header field equal; the matrices within 3.5e-18 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
itk/Modules/IO/NIFTI/test/Input/xyzt_units_test_scl.nii.gzITK test data8x8x4x5 float64 with xyzt_units 19 (micrometres + milliseconds): pixdim 400/1200 must be converted to 0.4 mm and 1.2 s.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Modules/IO/NIFTI/test/Input/xyzt_units_test_scl_mm_s.nii.gzITK test dataThe same image declared in mm and seconds (xyzt_units 10, pixdim 0.4/1.2): the reference for the units test.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Testing/Data/Input/LPSLabels.nii.gzITK test dataReal 256x256x124 scan (0.94x0.94x1.5 mm, ~0.40 rad oblique, LAS) holding a small label image stored as int16 with scl_s…Within nibabel's own variability

data and every header field equal; the matrices within 8.6e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
itk/Testing/Data/Input/LPSLabels_noqform.nii.gzITK test dataSame image with qform_code 0 and sform_code 1: the sform-only path.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
itk/Testing/Data/Input/LPSLabels_nosform.nii.gzITK test dataSame image with qform_code 1 and sform_code 0: the qform-only path.Within nibabel's own variability

data and every header field equal; the matrices within 8.6e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
itk/Testing/Data/Input/NonOrthoSform.nii.gzITK test dataSame image with qform_code 0 and a NON-orthogonal sform (shear; obliquity 0.44 vs 0.40): readers that build an orthonor…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
itk/Testing/Data/Input/itkNiftisform2DirectionDef.nii.gzITK test dataClinical-like 432x512x25 int16 (0.27x0.27x4.55 mm, slightly oblique) with qform_code 1 and sform_code 2 that differ in …Within nibabel's own variability

data and every header field equal; the matrices within 4.2e-13 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
itk/Testing/Data/Input/r16slice.nii.gzITK test data2D 256x256 float32 brain slice (1 mm, qform 2 / sform 1): fixed image of the classic ITK/ANTs 2D registration pair.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
itk/Testing/Data/Input/r64slice.nii.gzITK test data2D 256x256 float32 brain slice: moving image of the r16/r64 registration pair (rotated/shifted relative to r16).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
nibabel/doc/source/downloads/someones_anatomy.nii.gznibabel test datanibabel's coordinate-systems tutorial anatomical (57x67x56 at 2.75 mm, uint8 scaled, qform=sform=4, RAS); pairs with so…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
nibabel/doc/source/downloads/someones_epi.nii.gznibabel test datanibabel's coordinate-systems tutorial EPI (53x61x33 at 3 mm, uint8 with scaling slope 0.377/inter 7.74, qform=sform=4, …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
nibabel/tests/data/anatomical.niinibabel test dataNIfTI-1 single file, BIG-endian int16, 33x41x25 at 2 mm, qform=sform=2 (aligned), LAS (qfac -1), SPM-normalised anatomi…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
nibabel/tests/data/example4d.nii.gznibabel test dataGzipped NIfTI-1 4D (128x96x24x2 int16) written by FSL 3.3: two NIfTI extensions (code 6, comment) so vox_offset is 416,…Within nibabel's own variability

data and every header field equal; the matrices within 4.4e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
nibabel/tests/data/example_nifti2.nii.gznibabel test dataGzipped NIfTI-2 single file (540-byte header, magic n+2), 32x20x12x2 int16 with two comment extensions (vox_offset 608)…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

19/19
nibabel/tests/data/functional.niinibabel test dataNIfTI-1 single file, little-endian int16 4D (17x21x3x20, 4x4x8 mm, TR 2 s) with real scaling (scl_slope 0.0754, scl_int…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
nibabel/tests/data/nifti1.hdrnibabel test dataNIfTI-1 pair header (magic ni1) only, 91x109x91 int16 at 2 mm, qform=sform=4 (MNI), LAS; no .img is distributed: header…Rejected by both

nibabel: FileNotFoundError(2, ‘No such file or directory’); LARMORX: FileNotFoundError(‘/nibabel/tests/data/nifti1.img: No such file or directory (os error 2)’)

1/1
nibabel/tests/data/nifti2.hdrnibabel test dataNIfTI-2 pair header (magic ni2, 540 bytes) only, same geometry as nifti1.hdr: header parsing of the two-file NIfTI-2 va…Rejected by both

nibabel: FileNotFoundError(2, ‘No such file or directory’); LARMORX: FileNotFoundError(‘/nibabel/tests/data/nifti2.img: No such file or directory (os error 2)’)

1/1
nibabel/tests/data/reoriented_anat_moved.niinibabel test dataNIfTI-1, big-endian float32, 21x26x22 at 4 mm, RAS (qfac +1), qform=sform=2: anatomical with a rotated/translated affin…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
nibabel/tests/data/resampled_anat_moved.niinibabel test dataNIfTI-1, big-endian float32, 17x21x3 at 4x4x8 mm, LAS: SPM's resampling of the moved anatomical onto the functional gri…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
nibabel/tests/data/standard.nii.gznibabel test dataTiny gzipped NIfTI-1 mask (4x5x7 uint8, 1x3x2 mm) generated by gen_standard.py: qform_code 0 with sform_code 2 (sform o…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_desc-aparcaseg_dseg.nii.gzfMRIPrep derivativesFreeSurfer aparc+aseg resampled to the T1w grid (int16 labels).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_desc-aseg_dseg.nii.gzfMRIPrep derivativesFreeSurfer aseg resampled to the T1w grid (int16 labels, FreeSurfer LUT): label-volume resampling reference.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_desc-brain_mask.nii.gzfMRIPrep derivativesfMRIPrep T1w brain mask (uint8; antsBrainExtraction with OASIS30ANTs): reference output for the comparison of brain extractions (Di…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_desc-preproc_T1w.nii.gzfMRIPrep derivativesfMRIPrep's preprocessed (INU-corrected) T1w in native T1w space, 160x192x192 at 1x1.33x1.33 mm like the raw input; int1…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_dseg.nii.gzfMRIPrep derivatives3-class tissue segmentation (int16 labels 1=GM, 2=WM, 3=CSF) from fMRIPrep's FAST step: reference for segmentation pari…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_label-CSF_probseg.nii.gzfMRIPrep derivativesCSF probability map (float32), used for CSF CompCor/confounds.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_label-GM_probseg.nii.gzfMRIPrep derivativesGrey-matter probability map (float32) in T1w space.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_label-WM_probseg.nii.gzfMRIPrep derivativesWhite-matter probability map (float32), used for the WM mask of BBR/CompCor.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gzfMRIPrep derivativesT1w brain mask in MNI152NLin2009cAsym res-2 (label resampling through the .h5 transform).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/anat/sub-01_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.nii.gzfMRIPrep derivativesPreprocessed T1w resampled to MNI152NLin2009cAsym res-2 (97x115x97 float32, q/s code 4): end-to-end reference for apply…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_boldref.nii.gzfMRIPrep derivativesBOLD reference of run 1 in native BOLD space (64x64x34 int16, scaled, LAS): reference output for boldref estimation.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-brain_mask.nii.gzfMRIPrep derivativesBOLD brain mask in native BOLD space (uint8).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_desc-preproc_bold.nii.gzfMRIPrep derivativesPreprocessed run-1 BOLD in native BOLD space (64x64x34x240, motion-corrected, scaled int16): reference for head-motion …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-MNI152NLin2009cAsym_res-2_boldref.nii.gzfMRIPrep derivativesBOLD reference in MNI152NLin2009cAsym res-2 (97x115x97): composition of BOLD->T1w affine and the T1w->MNI .h5 transform.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-T1w_boldref.nii.gzfMRIPrep derivativesBOLD reference resampled into T1w space (49x52x37 at 3.125x3.125x4 mm, q/s code 2, RAS): fMRIPrep's 'T1w-space, BOLD-re…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-T1w_desc-brain_mask.nii.gzfMRIPrep derivativesBOLD brain mask in T1w space.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro-derivatives/ds000005-fmriprep/sub-01/func/sub-01_task-mixedgamblestask_run-1_space-T1w_desc-preproc_bold.nii.gzfMRIPrep derivativesPreprocessed run-1 BOLD in T1w space (49x52x37x240, scaled int16): reference for the one-shot HMC + coregistration resa…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds000002/sub-01/anat/sub-01_inplaneT2.nii.gzOpenNeuro datasetsBOTH qform_code and sform_code are 0: no orientation information (NIfTI 'method 1'), so readers must fall back to a pix…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000005/sub-01/anat/sub-01_T1w.nii.gzOpenNeuro datasetsThe reference real T1w for the quick check and fMRIPrep's main CI subject: 160x192x192 int16, 1x1.33x1.33 mm (anisotropic),…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000005/sub-01/anat/sub-01_inplaneT2.nii.gzOpenNeuro datasetsIn-plane T2 matching the BOLD slice prescription (128x128x34, 1.56x1.56x4 mm, LAS); raw scl_slope = 0 (meaning 'no scal…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000005/sub-01/func/sub-01_task-mixedgamblestask_run-01_bold.nii.gzOpenNeuro datasetsBOLD run 1 of fMRIPrep's main CI subject: 64x64x34x240, 3.125x3.125x4 mm, TR 2 s, int16, LAS (qfac -1), single-band. Up…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000005/sub-01/func/sub-01_task-mixedgamblestask_run-02_bold.nii.gzOpenNeuro datasetsBOLD run 2 of sub-01 (64x64x34x240, TR 2 s, LAS); with run 1 gives a multi-run session for run-level workflows (per-run…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000117/sub-01/ses-mri/func/sub-01_ses-mri_task-facerecognition_run-01_bold.nii.gzOpenNeuro datasetsSingle-band 3 T BOLD with complete acquisition metadata (64x64x33x208 at 3x3x3.75 mm, TR 2 s, Siemens Trio, strongly ob…Within nibabel's own variability

data and every header field equal; the matrices within 4.4e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000122/sub-17/func/sub-17_task-visualattentiontask_run-01_bold.nii.gzOpenNeuro datasetsWhole-brain BOLD with a non-normalised qform quaternion (|q|^2 = 1 + 8.5e-7; nibabel get_qform() raises), qform_code 1 …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000210/sub-02/anat/sub-02_T1w.nii.gzOpenNeuro datasetsT1w of fMRIPrep's ds000210 CI subject (sub-02). Real-world quirks: stored as float64 with a trailing singleton 4th dime…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000210/sub-02/func/sub-02_task-cuedSGT_run-01_echo-1_bold.nii.gzOpenNeuro datasetsMulti-echo BOLD, echo 1 (TE 13 ms) of the run fMRIPrep's CI preprocesses (sub-02 task-cuedSGT run-01): 64x64x33x260, 3.…Within nibabel's own variability

data and every header field equal; the matrices within 5.6e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000210/sub-02/func/sub-02_task-cuedSGT_run-01_echo-2_bold.nii.gzOpenNeuro datasetsMulti-echo BOLD, echo 2 (TE 27 ms) of the run fMRIPrep's CI preprocesses (sub-02 task-cuedSGT run-01): 64x64x33x260, 3.…Within nibabel's own variability

data and every header field equal; the matrices within 5.6e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000210/sub-02/func/sub-02_task-cuedSGT_run-01_echo-3_bold.nii.gzOpenNeuro datasetsMulti-echo BOLD, echo 3 (TE 43 ms) of the run fMRIPrep's CI preprocesses (sub-02 task-cuedSGT run-01): 64x64x33x260, 3.…Within nibabel's own variability

data and every header field equal; the matrices within 5.6e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000217/sub-Exp1s08/anat/sub-Exp1s08_T1w.nii.gzOpenNeuro datasetssform_code 0 with qform_code 1 (geometry only in the quaternion), sagittal PIR storage, scaled int16 (scl_slope 0.0114,…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds000217/sub-Exp2s01/anat/sub-Exp2s01_inplaneT1.nii.gzOpenNeuro datasetsSmall in-plane T1 (0.9 MB): sform_code 0, PLS storage, float32, oblique (~0.30 rad), xyzt_units 18 (millimetres + milli…Within nibabel's own variability

data and every header field equal; the matrices within 7.7e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000218/sub-22/anat/sub-22_T1w.nii.gzOpenNeuro datasetsqform_code 1 and sform_code 1 that DISAGREE: the qform reads ASL, the sform LAS (same translation, permuted rotation co…Within nibabel's own variability

data and every header field equal; the matrices within 2.8e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000221/sub-010139/ses-02/anat/sub-010139_ses-02_acq-mp2rage_defacemask.nii.gzOpenNeuro datasets19 KB defacing mask with a BIG-endian header (uint8 data, so only header byte order matters), sform_code 0: the smalles…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds000222/sub-3107/anat/sub-3107_T1w.nii.gzOpenNeuro datasetsASR storage orientation (rare: first axis anterior), float32 FreeSurfer-written, oblique (~0.36 rad).Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000222/sub-4143/anat/sub-4143_T1w.nii.gzOpenNeuro datasetsExtremely oblique T1w (obliquity ~0.75 rad, about 43 degrees) in PIR storage, float32: worst-case obliquity for reorien…Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000228/sub-pixar008/anat/sub-pixar008_T1w.nii.gzOpenNeuro datasetsPediatric T1w of a 3.53-year-old girl (participants.tsv): Siemens Trio MPRAGE, 176x192x192 at 1 mm, scaled int16 (scl_s…Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds000240/sub-01/perf/sub-01_asl.nii.gzOpenNeuro datasets4D ASL series (64x57x16x110) with pixdim[4] = 0 (no TR in the header), scaled int16.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds000241/sub-08/anat/sub-08_T1w.nii.gzOpenNeuro datasetsExtreme scaling on int16: scl_slope 31.44 and scl_inter 1.03e6 (scaled values around 1e6, beyond float32 integer precis…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds000248/sub-01/anat/sub-01_T1w.nii.gzOpenNeuro datasetsMNE 'sample' subject T1w: qform_code 0 with sform_code 2 (sform-only geometry), FreeSurfer-conformed 256^3 LIA, uint8 w…Within nibabel's own variability

data and every header field equal; the matrices within 8.7e-19 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds000258/sub-21262/anat/sub-21262_T1w.nii.gzOpenNeuro datasetsBIG-endian header and data (>i2), PIL storage, scaled (scl_slope 0.011, scl_inter 360.5), slightly oblique (~0.07 rad).Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds000258/sub-21262/func/sub-21262_task-rest_echo-1_bold.nii.gzOpenNeuro datasetsBIG-endian 4D BOLD (>i2, 64x64x30x239, echo 1 of the four-echo run, TE 12 ms), LPS, oblique; with echoes 2-4 the input …Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000258/sub-21262/func/sub-21262_task-rest_echo-2_bold.nii.gzOpenNeuro datasetsBIG-endian 4D BOLD (>i2, 64x64x30x239, echo 2 of the four-echo run, TE 28 ms), LPS, oblique; with echoes 2-4 the input …Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000258/sub-21262/func/sub-21262_task-rest_echo-3_bold.nii.gzOpenNeuro datasetsBIG-endian 4D BOLD (>i2, 64x64x30x239, echo 3 of the four-echo run, TE 44 ms), LPS, oblique; with echoes 2-4 the input …Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds000258/sub-21262/func/sub-21262_task-rest_echo-4_bold.nii.gzOpenNeuro datasetsBIG-endian 4D BOLD (>i2, 64x64x30x239, echo 4 of a multi-echo run), LPS, oblique; dim[6] = dim[7] = 0 where unused dime…Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds001547/sub-181004LEEV1LGN/stat/BOLDzstat2.niiOpenNeuro datasetsUncompressed z-statistic map with intent_code 5 (NIFTI_INTENT_ZSCORE), float32 162x216x26; stored outside the BIDS layo…Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds001600/sub-1/anat/sub-1_T1w.nii.gzOpenNeuro datasetsSiemens Prisma T1w (176x256x256, 1 mm, sagittal slices stored RAS) with scaled int16 data (scl_slope 0.0121, scl_inter …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds001600/sub-1/fmap/sub-1_acq-v1_magnitude1.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v1: magnitude of echo 1; the fieldmap is computed from the two phase image…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v1_magnitude2.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v1: magnitude of echo 2; the fieldmap is computed from the two phase image…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v1_phase1.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v1: phase of echo 1 (TE 4 ms); the fieldmap is computed from the two phase…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v1_phase2.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v1: phase of echo 2 (TE 7.11 ms); the fieldmap is computed from the two ph…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v2_magnitude1.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v2: magnitude of echo 1; the fieldmap is computed from the two phase image…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v2_magnitude2.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v2: magnitude of echo 2; the fieldmap is computed from the two phase image…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v2_phase1.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v2: phase of echo 1 (TE 4 ms); the fieldmap is computed from the two phase…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v2_phase2.nii.gzOpenNeuro datasetsTwo-phase ('phase1/phase2') fieldmap set acq-v2: phase of echo 2 (TE 7.11 ms); the fieldmap is computed from the two ph…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v4_magnitude1.nii.gzOpenNeuro datasetsPhase-difference fieldmap set (acq-v4): first-echo magnitude (TE 4 ms) of the phase-difference fieldmap. 64x64x44 at 3.…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v4_magnitude2.nii.gzOpenNeuro datasetsPhase-difference fieldmap set (acq-v4): second-echo magnitude (TE 6.46 ms). 64x64x44 at 3.75x3.75x4 mm, LAS.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_acq-v4_phasediff.nii.gzOpenNeuro datasetsPhase-difference fieldmap set (acq-v4): phase-difference map (Siemens, int16 scanner units 0..4095 for -pi..pi) with Ec…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_dir-AP_epi.nii.gzOpenNeuro datasetsPEPOLAR spin-echo EPI, PhaseEncodingDirection j- (80x80x60x5, 3 mm, TR 4 s). Quirk: its opposite-direction partner (dir…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/fmap/sub-1_dir-PA_epi.nii.gzOpenNeuro datasetsPEPOLAR EPI with PhaseEncodingDirection j (64x64x44x5): the reversed-blip partner of dir-AP with a mismatched grid.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/func/sub-1_task-rest_acq-PA_bold.nii.gzOpenNeuro datasetsTarget of the PEPOLAR pair: 80x80x60x5, 3 mm, TR 4 s, PhaseEncodingDirection j.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/func/sub-1_task-rest_acq-v1_bold.nii.gzOpenNeuro datasetsTarget of the acq-v1 two-phase fieldmap (same bytes as acq-v4; kept so IntendedFor resolves inside the BIDS tree).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/func/sub-1_task-rest_acq-v2_bold.nii.gzOpenNeuro datasetsTarget of the acq-v2 two-phase fieldmap (same bytes as acq-v4).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001600/sub-1/func/sub-1_task-rest_acq-v4_bold.nii.gzOpenNeuro datasetsThe quick check's real BOLD: 64x64x44x5 (only 5 volumes, 0.75 MB), 3.75x3.75x4 mm, TR 3 s, LAS, SliceTiming in the sidecar…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds001972/sub-0018/ses-01/anat/sub-0018_ses-01_run-01_inplaneT1.nii.gzOpenNeuro datasetsLIP storage (coronal-like slab), obliquity ~0.75 rad, and dim[0] = 4 with a singleton 4th dimension (256x256x28x1) for …Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds002155/sub-30/anat/sub-30_T1w.nii.gzOpenNeuro datasetsHuge header extension: one ecode-0 extension of 328,992 bytes (dcmstack JSON) puts vox_offset at 329,344; readers that …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds002169/sub-01/anat/sub-01_T1w.nii.gzOpenNeuro datasetsIPL storage orientation (first voxel axis points inferior: axial slices stacked along axis 0), unscaled int16, AFNI hea…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds002207/sub-01/anat/sub-01_T1w.nii.gzOpenNeuro datasetsqform_code 1 and sform_code 1 with identical rotation but translations differing by ~72 mm in z (and ~2 mm in x); scale…Within nibabel's own variability

data and every header field equal; the matrices within 1.4e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds002543/sub-001/anat/sub-001_T1w.nii.gzOpenNeuro datasetsPhilips 3D TFE: qform (code 1) reads RPS while sform (code 1) reads LAS, i.e. x and y sign-flipped with the same origin…Within nibabel's own variability

data and every header field equal; the matrices within 8.6e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds002711/sub-14/anat/sub-14_T2w.niiOpenNeuro datasetsUncompressed .nii from a GE scanner ('T2 FLAIR_FS ARC 3mm', 512x512x30), sform_code 0 (qform only), slightly oblique (~…Within nibabel's own variability

data and every header field equal; the matrices within 1.6e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds002738/sub-269/func/sub-269_task-reward_run-1_sbref.nii.gzOpenNeuro datasetsSingle-band reference stored as float64, 100x100x64, LPS.Within nibabel's own variability

data and every header field equal; the matrices within 8.9e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds002738/sub-384/fmap/sub-384_magnitude.nii.gzOpenNeuro datasetsReal 5D image: dim[0] = 5, shape 128x128x36x2x1 (two echoes along the 4th axis plus a singleton 5th), float32, LPS.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds003012/sub-01/fmap/sub-01_magnitude1.nii.gzOpenNeuro datasetsFieldmap magnitude stored as int32 (written by FSL 6.0.1 from the authors' data), 64x64x36, strongly oblique (~0.59 rad…Within nibabel's own variability

data and every header field equal; the matrices within 4.4e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds003020/sub-UTS10/ses-5/func/sub-UTS10_ses-5_task-wheretheressmoke_run-4_bold.niiOpenNeuro datasetsCORRUPT as published: an uncompressed .nii of 9,906 bytes whose header declares 84x84x54x311 uint16 (~274 MB of voxels)…Rejected by both

nibabel: OSError(‘Expected 236996928 bytes, got 9554 bytes from /openneuro/ds003020/sub-UTS10/ses-5/func/sub-UTS10_ses-5_task-wheretheressmoke_run-4_bold.nii\n - could the file be damaged?’); LARMORX: NiftiError('/openneuro/ds0…

1/1
openneuro/ds003345/sub-22973/func/sub-22973_task-PenaltyKik_run-02_bold.nii.gzOpenNeuro datasetsTR stored in milliseconds: xyzt_units 18 (mm + ms) and pixdim[4] = 2000, while the sidecar says RepetitionTime 2.0 s; L…Within nibabel's own variability

data and every header field equal; the matrices within 4.4e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds003592/sub-280/ses-1/anat/sub-280_ses-1_T1w.nii.gzOpenNeuro datasetsOlder-adult T1w of an 82-year-old woman (participants.tsv; Toronto site): MPRAGE 1 mm (192x256x256, RAS, AFNI header ex…Within nibabel's own variability

data and every header field equal; the matrices within 5.7e-20 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds003763/sub-16111/func/sub-16111_task-heart_bold.nii.gzOpenNeuro datasetsCORRUPT as published: exactly 65,536 bytes of a gzip stream with no end (decompresses to ~165 KB of a declared 64x64x36…Rejected by both

nibabel: OSError(‘Expected 152764416 bytes, got 164400 bytes from object\n - could the file be damaged?’); LARMORX: OSError(‘/openneuro/ds003763/sub-16111/func/sub-16111_task-heart_bold.nii.gz: incomplete deflate stream’)

1/1
openneuro/ds003990/sub-05/ses-02/anat/sub-05_ses-02_part-phase_T2starw.nii.gzOpenNeuro datasetsqform_code 1 but the qform is a bare identity (RAS, zero offsets) while sform_code 1 holds the real oblique LAS geometr…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds004199/sub-00053/anat/sub-00053_acq-traacpcVNS_FLAIR_roi.nii.gzOpenNeuro datasetsLesion ROI with intent_code 1002 (NIFTI_INTENT_LABEL), int16, raw scl_slope 0; 6.5 KB.Within nibabel's own variability

data and every header field equal; the matrices within 8.9e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds004856/sub-2220/ses-wave1/anat/sub-2220_ses-wave1_acq-MPRAGE_run-1_T1w.nii.gzOpenNeuro datasetsPhilips MPRAGE stored as int16 with scl_slope 35.32 and scl_inter 1.157e6; PSR storage; slightly oblique (~0.065 rad).Within nibabel's own variability

data and every header field equal; the matrices within 1e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds005040/sub-002/anat/sub-002_T1w.nii.gzOpenNeuro datasetsPhilips T1-TFE T1w (0.85x0.83x0.83 mm) stored as int16 with large Philips scaling (scl_slope 1.697, scl_inter 55592): s…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds005040/sub-002/fmap/sub-002_dir-A_epi.nii.gzOpenNeuro datasetsPhilips PEPOLAR gradient-echo EPI (5 volumes, scaled int16 with scl_slope ~48), PhaseEncodingDirection j, TotalReadoutT…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds005040/sub-002/fmap/sub-002_dir-P_epi.nii.gzOpenNeuro datasetsReversed-blip partner (PhaseEncodingDirection j-).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds005040/sub-002/func/sub-002_task-clip_run-1_bold.nii.gzOpenNeuro datasetsPhilips BOLD (64x64x40x63, scaled int16 with scl_slope ~48, PhaseEncodingDirection j) corrected by the dir-A/dir-P pair.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds005143/sub-unfMSL03/func/sub-unfMSL03_task-rest_rec-MoCoMean_bold.nii.gzOpenNeuro datasetsNon-normalised qform quaternion (b^2+c^2+d^2 = 1 + 9.1e-7, beyond nibabel's tolerance: get_qform() raises 'w2 should be…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds005371/sub-07/ses-02/mrs/sub-07_ses-02_acq-megaslaser_mrsref.nii.gzOpenNeuro datasetsNIfTI-MRS reference scan: NIfTI-2 (540-byte header), complex128, dim[0] = 7 (1x1x1x4096x32x2x2), header extension ecode…Within nibabel's own variability

data and every header field equal; the matrices within 4.2e-14 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
openneuro/ds005454/sub-16/anat/sub-16_acq-denoised_T1w.nii.gzOpenNeuro datasets7 T MP2RAGE UNI image after vendor denoising (224x272x288 at 0.8x0.8x0.8 mm, int16 scaled with scl_slope 0.0625/scl_int…Within nibabel's own variability

data and every header field equal; the matrices within 6.9e-18 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds005454/sub-16/fmap/sub-16_magnitude1.nii.gzOpenNeuro datasets7 T GRE fieldmap, first-echo magnitude (112x112x70 at 2x2x2.1 mm, TE 3.06 ms, oblique like the BOLD).Within nibabel's own variability

data and every header field equal; the matrices within 1.4e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds005454/sub-16/fmap/sub-16_magnitude2.nii.gzOpenNeuro datasets7 T GRE fieldmap, second-echo magnitude (TE 4.08 ms).Within nibabel's own variability

data and every header field equal; the matrices within 1.4e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds005454/sub-16/fmap/sub-16_phasediff.nii.gzOpenNeuro datasets7 T phase-difference map stored as scaled int16 (scl_slope 2, scl_inter -4096, i.e. -4096..4094 after scaling): phasedi…Within nibabel's own variability

data and every header field equal; the matrices within 1.4e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

21/21
openneuro/ds005752/sub-ON01016/ses-01/anat/sub-ON01016_ses-01_acq-FSPGR_rec-SCIC_T1w.nii.gzOpenNeuro datasetsGE IR-FSPGR T1w with SCIC intensity correction (196x256x256 at 1.2x1.05x1.05 mm, RAS, xyzt_units mm only, AFNI header e…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds005752/sub-ON01016/ses-01/fmap/sub-ON01016_ses-01_acq-bold_fieldmap.nii.gzOpenNeuro datasetsDirect B0 fieldmap in Hz reconstructed by the GE scanner (product 'B0rf' sequence, ImageType FIELDMAPHZ, converted by d…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds005752/sub-ON01016/ses-01/fmap/sub-ON01016_ses-01_acq-bold_magnitude.nii.gzOpenNeuro datasetsMagnitude image of the GE B0 map (same grid), used to register the fieldmap and build its mask.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds005752/sub-ON01016/ses-01/func/sub-ON01016_ses-01_task-rest_dir-forward_bold.nii.gzOpenNeuro datasetsGE resting-state BOLD (64x64x48x200, 3.44x3.44x3.4 mm, TR 3 s, LAS) on the fieldmap grid: the run the B0 map is for; a …Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds005752/sub-ON01016/ses-01/func/sub-ON01016_ses-01_task-rest_dir-reverse_bold.nii.gzOpenNeuro datasets10-volume reversed-blip EPI acquired as a BOLD run. Upstream metadata quirk: its sidecar declares the same PhaseEncodin…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
openneuro/ds006010/sub-206/anat/sub-206_T1w.nii.gzOpenNeuro datasets1 mm T1w (MPRAGE, Siemens Prisma, 160x240x256, int16 scaled with scl_slope 0.0186/scl_inter 608, RAS; defaced) so the m…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds006010/sub-206/func/sub-206_task-category_run-01_bold.nii.gzOpenNeuro datasetsCMRR multiband BOLD (MultibandAccelerationFactor 3; 96x96x69x113 at 2 mm, TR 1.81 s, oblique ~0.14 rad, LAS) stored as …Within nibabel's own variability

data and every header field equal; the matrices within 2.2e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds006010/sub-206/func/sub-206_task-category_run-01_sbref.nii.gzOpenNeuro datasetsSingle-band reference of the multiband run (96x96x69 uint16, same grid): the high-contrast image fMRIPrep uses as the B…Within nibabel's own variability

data and every header field equal; the matrices within 2.2e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds006248/sub-003/anat/sub-003_acq-CECor_T1w.niiOpenNeuro datasetsUncompressed .nii; clinical contrast-enhanced coronal T1w stored LIP, 512x512x13 at 0.31x0.31x2.8 mm (very anisotropic,…Within nibabel's own variability

data and every header field equal; the matrices within 8.2e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds006736/sub-004/anat/sub-004_T1w.nii.gzOpenNeuro datasetsThe subject's 0.8 mm MPRAGE T1w.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
openneuro/ds006736/sub-004/fmap/sub-004_dir-AP_epi.nii.gzOpenNeuro datasetsPEPOLAR spin-echo EPI, PhaseEncodingDirection j- (AP), TotalReadoutTime 0.0246 s, same grid and readout as the BOLD; In…Within nibabel's own variability

data and every header field equal; the matrices within 1.3e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds006736/sub-004/fmap/sub-004_dir-PA_epi.nii.gzOpenNeuro datasetsPEPOLAR spin-echo EPI with the reversed blip, PhaseEncodingDirection j (PA): with dir-AP it forms a clean TOPUP-style p…Within nibabel's own variability

data and every header field equal; the matrices within 1.3e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds006736/sub-004/func/sub-004_task-freeRecall_bold.nii.gzOpenNeuro datasetsTarget BOLD of the PEPOLAR pair (74x64x58x69 on the same grid as the epi pair; the subject's shortest run; multiband 2,…Within nibabel's own variability

data and every header field equal; the matrices within 1.3e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
openneuro/ds007694/sub-GRACE101/mrs/sub-GRACE101_mrsref.nii.gzOpenNeuro datasetsSingle-voxel NIfTI-MRS: NIfTI-2, complex64, 1x1x1x512 (spectral axis with pixdim[4] = 0.001 s dwell time), ecode 44 ext…Within nibabel's own variability

data and every header field equal; the matrices within 3.6e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
openneuro/ds008719/sub-001/anat/sub-001_T1w.nii.gzOpenNeuro datasetsxyzt_units 0 (spatial units unspecified, must be assumed mm) together with qform_code 0 / sform_code 2; int16 192x256x2…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/complex128-be.niisynthetic: data typescomplex128 data in big-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/complex128-le.niisynthetic: data typescomplex128 data in little-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/complex64-be.niisynthetic: data typescomplex64 data in big-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/complex64-le.niisynthetic: data typescomplex64 data in little-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/float32-be.niisynthetic: data typesfloat32 data in big-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/float32-le.niisynthetic: data typesfloat32 data in little-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/float64-be.niisynthetic: data typesfloat64 data in big-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/float64-le.niisynthetic: data typesfloat64 data in little-endian byte order, covering the type's extremes and NaN/±inf/-0.0Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int16-be.niisynthetic: data typesint16 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int16-le.niisynthetic: data typesint16 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int32-be.niisynthetic: data typesint32 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int32-le.niisynthetic: data typesint32 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int64-be.niisynthetic: data typesint64 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int64-le.niisynthetic: data typesint64 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int8-be.niisynthetic: data typesint8 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/int8-le.niisynthetic: data typesint8 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/rgb24.niisynthetic: data typesRGB24 (datatype 128): supported by nibabel, not (yet) by LARMORX.Expected divergence

RGB24 data are not supported by LARMORX yet (LARMORX: NiftiError(‘/data/synthetic/nifti/dtypes/rgb24.nii: data type code 128 is not supported’); nibabel: reads it)

0/0
synthetic/nifti/dtypes/rgba32.niisynthetic: data typesRGBA32 (datatype 2304): supported by nibabel, not (yet) by LARMORX.Expected divergence

RGBA32 data are not supported by LARMORX yet (LARMORX: NiftiError(‘/data/synthetic/nifti/dtypes/rgba32.nii: data type code 2304 is not supported’); nibabel: reads it)

0/0
synthetic/nifti/dtypes/uint16-be.niisynthetic: data typesuint16 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint16-le.niisynthetic: data typesuint16 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint32-be.niisynthetic: data typesuint32 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint32-le.niisynthetic: data typesuint32 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint64-be.niisynthetic: data typesuint64 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint64-le.niisynthetic: data typesuint64 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint8-be.niisynthetic: data typesuint8 data in big-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/dtypes/uint8-le.niisynthetic: data typesuint8 data in little-endian byte order, covering the type's extremesBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/extensions-pair.hdr.gzsynthetic: header fieldsExtensions in a gzipped header file (read to the end of the file).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/extensions.niisynthetic: header fieldsThree extensions: a comment, AFNI XML, and content needing padding.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/fix-bitpix.niisynthetic: header fieldsbitpix 8 for int16 data: fixed from the data type on load.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/fix-negative-pixdim.niisynthetic: header fieldsNegative pixdim[1] and pixdim[3]: fixed to their absolute values on load.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/fix-qfac-zero.niisynthetic: header fieldsqfac (pixdim[0]) = 0: fixed to 1 on load.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/header/fix-zero-pixdim.niisynthetic: header fieldspixdim[2] = 0: fixed to 1 on load.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/slice-timing.nii.gzsynthetic: header fieldsdim_info (freq 1, phase 2, slice 3), slice_code alt+inc, slice_start/end, slice_duration.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/text-and-units.niisynthetic: header fieldsdescrip, aux_file, intent name/params, units, cal_min/max and toffset set.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/header/vox-offset-gap.niisynthetic: header fieldsvox_offset 400 (beyond the minimum 352, not a multiple of 16): bytes before the data are skipped.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/layouts/big-endian-nifti2.nii.gzsynthetic: file layoutsBig-endian NIfTI-2, gzipped.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
synthetic/nifti/layouts/gzip-content-named-nii.niisynthetic: file layoutsA gzipped file named .nii: LARMORX detects gzip from the content, nibabel from the name.Expected divergence

LARMORX detects gzip from the file content; nibabel from the file name (and fails) (LARMORX: reads it; nibabel: ImageFileError(‘Cannot work out file type of “/data/synthetic/nifti/layouts/gzip-content-named-nii.nii”’))

0/0
synthetic/nifti/layouts/nifti1-pair-gz.hdr.gzsynthetic: file layoutsNIfTI-1 header/image pair, gzipped, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/layouts/nifti1-pair.hdrsynthetic: file layoutsNIfTI-1 header/image pair, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/layouts/nifti1-single-gz.nii.gzsynthetic: file layoutsNIfTI-1 single file, gzipped, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/layouts/nifti1-single.niisynthetic: file layoutsNIfTI-1 single file, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/layouts/nifti2-pair-gz.hdr.gzsynthetic: file layoutsNIfTI-2 header/image pair, gzipped, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
synthetic/nifti/layouts/nifti2-pair.hdrsynthetic: file layoutsNIfTI-2 header/image pair, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
synthetic/nifti/layouts/nifti2-single-gz.nii.gzsynthetic: file layoutsNIfTI-2 single file, gzipped, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
synthetic/nifti/layouts/nifti2-single.niisynthetic: file layoutsNIfTI-2 single file, oblique float32Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

19/19
synthetic/nifti/layouts/plain-content-named-gz.nii.gzsynthetic: file layoutsAn uncompressed file named .nii.gz: LARMORX reads it, nibabel does not.Expected divergence

LARMORX detects gzip from the file content; nibabel from the file name (and fails) (LARMORX: reads it; nibabel: ImageFileError(‘File /data/synthetic/nifti/layouts/plain-content-named-gz.nii.gz is not a gzip file’))

0/0
synthetic/nifti/layouts/uppercase.HDRsynthetic: file layoutsPair with upper-case extensions (.HDR/.IMG).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/malformed/bad-magic.niisynthetic: malformed filesMagic string 'xyz': not NIfTI.Rejected by both

nibabel: ImageFileError(‘Cannot work out file type of “/data/synthetic/nifti/malformed/bad-magic.nii”’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/bad-magic.nii: invalid magic string “xyz\0”’)

1/1
synthetic/nifti/malformed/extension-bad-size.niisynthetic: malformed filesAn extension whose esize (4) is smaller than its own 8-byte header.Rejected by both

nibabel: ValueError(‘read length must be non-negative or -1’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/extension-bad-size.nii: bad header extension: extension size 4 is smaller than its 8-byte header’)

0/0
synthetic/nifti/malformed/float128-datatype.niisynthetic: malformed filesdatatype 1536 (float128): defined by NIfTI, supported by neither reader here.Rejected by both

nibabel: HeaderDataError(‘data code 1536 not supported’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/float128-datatype.nii: data type code 1536 is not supported’)

1/1
synthetic/nifti/malformed/ndim-8.niisynthetic: malformed filesdim[0] = 8 (more than NIfTI's 7 dimensions).Rejected by both

nibabel: HeaderDataError(‘vox offset 0 too low for single file nifti1’); LARMORX: NiftiError('/data/synthetic/nifti/malformed/ndim-8.nii: vox_offset 0.00000000000000000000000000000000000000006323079060572872 is below the minimum 352 for a si…

1/1
synthetic/nifti/malformed/negative-dim.niisynthetic: malformed filesdim[2] = -6.Rejected by both

nibabel: OverflowError(‘memory mapped length must be positive’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/negative-dim.nii: dim[2] = -6 is negative’)

1/1
synthetic/nifti/malformed/not-nifti.niisynthetic: malformed files400 bytes of text: not a NIfTI file at all.Rejected by both

nibabel: ImageFileError(‘Cannot work out file type of “/data/synthetic/nifti/malformed/not-nifti.nii”’); LARMORX: NiftiError('/data/synthetic/nifti/malformed/not-nifti.nii: not a NIfTI-1 or NIfTI-2 header (sizeof_hdr is nei…

0/0
synthetic/nifti/malformed/truncated-data.niisynthetic: malformed filesThe data stop 10 bytes short.Rejected by both

nibabel: OSError(‘Expected 420 bytes, got 410 bytes from /data/synthetic/nifti/malformed/truncated-data.nii\n - could the file be damaged?’); LARMORX: NiftiError('/data/synthetic/nifti/malformed/truncated-data.nii: expected…

1/1
synthetic/nifti/malformed/truncated-gzip.nii.gzsynthetic: malformed filesA gzip stream cut in the middle.Rejected by both

nibabel: OSError(‘Expected 32000 bytes, got 15945 bytes from object\n - could the file be damaged?’); LARMORX: OSError(‘/data/synthetic/nifti/malformed/truncated-gzip.nii.gz: incomplete deflate stream’)

1/1
synthetic/nifti/malformed/truncated-header.niisynthetic: malformed filesThe file stops inside the header.Rejected by both

nibabel: ImageFileError(‘Cannot work out file type of “/data/synthetic/nifti/malformed/truncated-header.nii”’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/truncated-header.nii: file ends inside the header’)

0/0
synthetic/nifti/malformed/unknown-datatype.niisynthetic: malformed filesdatatype code 999.Rejected by both

nibabel: HeaderDataError(‘data code 999 not recognized’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/unknown-datatype.nii: data type code 999 is not supported’)

1/1
synthetic/nifti/malformed/vox-offset-too-small.niisynthetic: malformed filesSingle file with vox_offset 300 (< 352).Rejected by both

nibabel: HeaderDataError(‘vox offset 300 too low for single file nifti1’); LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/vox-offset-too-small.nii: vox_offset 300 is below the minimum 352 for a single-file image’)

1/1
synthetic/nifti/malformed/vox-offset-zero.niisynthetic: malformed filesSingle file with vox_offset 0: nibabel reads the header bytes as data; LARMORX refuses.Expected divergence

LARMORX rejects a single file with vox_offset 0; nibabel reads the header bytes as voxel data (LARMORX: NiftiError(‘/data/synthetic/nifti/malformed/vox-offset-zero.nii: vox_offset is 0 in a single-file image’); nibabel: reads it)

0/0
synthetic/nifti/orientation/axes-ASR.niisynthetic: orientationsAxis-aligned ASR orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-LAS.niisynthetic: orientationsAxis-aligned LAS orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-LPI.niisynthetic: orientationsAxis-aligned LPI orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-LPS.niisynthetic: orientationsAxis-aligned LPS orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-PSL.niisynthetic: orientationsAxis-aligned PSL orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-RAS.niisynthetic: orientationsAxis-aligned RAS orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/axes-SLP.niisynthetic: orientationsAxis-aligned SLP orientation in both qform and sform (anisotropic voxels)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/both-different.niisynthetic: orientationsqform (code 1) and sform (code 2) disagree: the sform wins.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/half-turn-qform.niisynthetic: orientationsqform rotated 180° about z (w = 0, the common LPS-to-RAS quaternion).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/invalid-xform-codes.niisynthetic: orientationsqform_code 9 and sform_code -1: fixed to 0 on load, so the base affine is used.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/left-handed-qform.niisynthetic: orientationsOblique left-handed (radiological) qform only: qfac = -1.Within nibabel's own variability

data and every header field equal; the matrices within 5.6e-17 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/neither.niisynthetic: orientationsqform and sform codes 0: the affine comes from pixdim (centred, x flipped).Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/qform-only.niisynthetic: orientationsOblique qform (code 1), sform code 0: the qform is the affine.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/quaternion-not-unit.niisynthetic: orientationsb² + c² + d² > 1 beyond the threshold: the qform is invalid (nibabel raises).Rejected by both

nibabel: ValueError(‘w2 should be positive, but is -1.400000e-01’); LARMORX: NiftiError(‘qform quaternion is not unit: 1 - (b² + c² + d²) = -1.4000000268220925e-1’)

1/1
synthetic/nifti/orientation/quaternion-w2-above-threshold.niisynthetic: orientations1 - b² - c² - d² just above the threshold: w = sqrt(w2), small but not zero.Within nibabel's own variability

data and every header field equal; the matrices within 8.7e-19 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/quaternion-w2-below-threshold.niisynthetic: orientations|1 - b² - c² - d²| below 3·eps(float32): nibabel sets w = 0.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/sform-only.niisynthetic: orientationsOblique sform (code 4, MNI), qform code 0: the sform is the affine.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/orientation/sheared-sform.niisynthetic: orientationsSheared (non-orthogonal) sform with code 2; the qform keeps the closest rotation.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/xform-code-1.niisynthetic: orientationsqform and sform with code 1Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/xform-code-2.niisynthetic: orientationsqform and sform with code 2Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/xform-code-3.niisynthetic: orientationsqform and sform with code 3Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/xform-code-4.niisynthetic: orientationsqform and sform with code 4Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/orientation/xform-code-5.niisynthetic: orientationsqform and sform with code 5Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/nifti/scaling/complex64-slope.niisynthetic: scale factorsScaling: complex64 × 2 + 1Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/float32-slope.niisynthetic: scale factorsScaling: float32 data scaled (−0.0 and NaN included)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/float64-inter-zero.niisynthetic: scale factorsScaling: float64 × 2 with intercept 0 (−0.0 must stay −0.0)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/int16-inter5.niisynthetic: scale factorsScaling: int16 + 5 (slope 1)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/int16-slope-big-endian.nii.gzsynthetic: scale factorsScaled big-endian int16, gzipped.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/int16-slope-inter.niisynthetic: scale factorsScaling: int16 × 0.5 − 3.25Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/int16-slope2.niisynthetic: scale factorsScaling: int16 × 2Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/int32-small-slope.niisynthetic: scale factorsScaling: int32 × 1e-6Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/nifti2-slope.niisynthetic: scale factorsNIfTI-2 with float64 scale factors that float32 cannot hold exactly.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

18/18
synthetic/nifti/scaling/slope-inf.niisynthetic: scale factorsScaling: slope +inf: no scalingBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/scaling/slope-nan.niisynthetic: scale factorsScaling: slope NaN: no scalingBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/scaling/slope-one-inter-nan.niisynthetic: scale factorsScaling: valid slope, NaN intercept (nibabel raises)Rejected by both

nibabel: HeaderDataError(‘Valid slope but invalid intercept nan’); LARMORX: NiftiError(‘/data/synthetic/nifti/scaling/slope-one-inter-nan.nii: scl_slope is valid but scl_inter = NaN is not finite’)

1/1
synthetic/nifti/scaling/slope-zero.niisynthetic: scale factorsScaling: slope 0: no scalingBit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/scaling/uint64-slope.niisynthetic: scale factorsScaling: uint64 × 0.5 (64-bit integers through float64)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/scaling/uint8-negative-slope.niisynthetic: scale factorsScaling: uint8 × −0.125 + 100Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
synthetic/nifti/shapes/1d.niisynthetic: shapesShape (17,)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/2d.niisynthetic: shapesShape (5, 6)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/3d-singleton.niisynthetic: shapesShape (64, 64, 1)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/4d-bold-like.nii.gzsynthetic: shapes4D int16 series, 12 volumes, TR 2.5 s, units mm/s (a miniature BOLD run).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/4d-one-volume.niisynthetic: shapesShape (4, 5, 6, 1)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/4d-tr-msec.niisynthetic: shapes4D with the time step in milliseconds (TR 800 ms).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/5d-vector.nii.gzsynthetic: shapes5D vector image (x, y, z, 1, 3) with intent VECTOR, like an ANTs displacement field.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/6d.niisynthetic: shapesShape (2, 3, 2, 2, 1, 2)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/7d.niisynthetic: shapesShape (2, 2, 2, 2, 2, 2, 2)Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/empty.niisynthetic: shapesA dimension of length 0 (no voxels).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/freesurfer-ico7.niisynthetic: shapesFreeSurfer's ico7 convention: 163842 x 1 x 1 stored as 27307 x 1 x 6.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/freesurfer-large-vector.niisynthetic: shapesFreeSurfer's long-vector convention: 40000 x 1 x 1 stored as dim[1] = -1, glmin = 40000.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
synthetic/nifti/shapes/nifti2-large-dim.nii.gzsynthetic: shapesNIfTI-2 with a dimension (40000) that NIfTI-1's int16 cannot hold.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

19/19
synthetic/resampling/transforms/warp-lps-vector.nii.gzsynthetic: transform imagesDisplacement field as ANTs writes it: a 5D NIfTI vector image (intent VECTOR) with LPS vectors, on an oblique 2 mm grid.Within nibabel's own variability

data and every header field equal; the matrices within 5.3e-16 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
synthetic/resampling/transforms/warp-ras-dispvect.nii.gzsynthetic: transform imagesThe same displacement as a RAS field with intent DISPVECT (written by nibabel), which ITK converts to LPS when reading.Within nibabel's own variability

data and every header field equal; the matrices within 1.1e-15 mm: nibabel computes the qform in numpy’s long double, 80-bit on Linux x86-64; computed in double, as nibabel does where long double is 64 bits (macOS on Apple silicon, Windows), its matrices are LARMORX’s, bit for bit (NIB-04)

22/22
templateflow/tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gzTemplateFlow templatesLinear ICBM152 T1w at 2 mm on the classic 91x109x91 grid (int16, qform=sform=4). Substitute for the requested MNI152NLi…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152Lin/tpl-MNI152Lin_res-02_desc-brain_mask.nii.gzTemplateFlow templates2 mm brain mask on the 91x109x91 grid (uint8).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gzTemplateFlow templatesThe 1 mm MNI152NLin2009cAsym T1w (193x229x193, int16, qform=sform=4): full-resolution registration target used by fMRIP…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-brain_mask.nii.gzTemplateFlow templates1 mm brain mask (uint8, unscaled): mask on the res-01 grid; compare with the scaled res-02 mask.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_label-brain_probseg.nii.gzTemplateFlow templates1 mm brain probability map (float32), the prior used for brain extraction and normalisation masking.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_T1w.nii.gzTemplateFlow templatesfMRIPrep's default standard space at 2 mm (97x115x97, int16, qform=sform=4 'MNI_152', RAS): the quick check's registration…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gzTemplateFlow templates2 mm brain mask on the res-02 grid. Real-world quirk: stored as uint8 0/255 with scl_slope = 1/255, so a reader that ig…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

21/21
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-fMRIPrep_boldref.nii.gzTemplateFlow templatesfMRIPrep's BOLD reference template at 2 mm (float32, qform=sform=1): target for BOLD-to-template registration tests; co…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_label-CSF_probseg.nii.gzTemplateFlow templatesCSF probability map at 2 mm (float32).Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_label-GM_probseg.nii.gzTemplateFlow templatesGrey-matter probability map at 2 mm (float32). Stands in for the requested res-02 label-brain_probseg, which TemplateFl…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_label-WM_probseg.nii.gzTemplateFlow templatesWhite-matter probability map at 2 mm (float32); with GM/CSF gives a full 3-class prior set on one grid.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gzTemplateFlow templatesOASIS-30 ANTs template T1w (216x291x256, 1 mm, float32, qform=sform=2 'aligned', xyzt_units mm only): fMRIPrep's defaul…Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gzTemplateFlow templatesBrain+cerebellum extraction mask (uint8) used as the registration mask in fMRIPrep/ANTs brain extraction.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-brain_mask.nii.gzTemplateFlow templatesBinary brain mask (uint8) on the OASIS30ANTs grid; a mask with 'aligned' (code 2) q/sform.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22
templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_label-brain_probseg.nii.gzTemplateFlow templatesBrain probability prior (float32) warped to the subject during antsBrainExtraction.Bit-identical

voxel data in every read mode, every header field, the extensions and the matrices equal; the written file read back alike

22/22

Speed

The benchmark (report) reads and writes each file with both libraries and SimpleITK, the files in the system’s page cache, so it times parsing, decompression and conversion, not the disk. Writing compressed files on several threads is in the report.

Speed, LARMORX’s own reader against nibabel 5.4.2 and SimpleITK 2.5.6

Seconds to read a gzipped file into memory (the median of repeated runs) on a log scale; the factor is nibabel’s time divided by LARMORX’s own at one thread. SimpleITK, another library that reads NIfTI, is the open square.

  • nibabel 5.4.2, read
  • LARMORX's own, read, 1 thread
  • LARMORX's own, read, all threads
  • SimpleITK 2.5.6, read
  1. sub-01_task-mixedgamblestask_run-03_bold (64×64×34×240 int16)nibabel 5.4.2, read 0.401 sLARMORX's own, read, 1 thread 0.26 sLARMORX's own, read, all threads 0.253 sSimpleITK 2.5.6, read 0.295 s1.5×
  2. sub-16_acq-mp2rage_T1w (224×272×288 float64)nibabel 5.4.2, read 0.198 sLARMORX's own, read, 1 thread 0.191 sLARMORX's own, read, all threads 0.122 sSimpleITK 2.5.6, read 0.19 s1×
  3. sub-16_task-rest_bold (160×160×96×280 int16)nibabel 5.4.2, read 5.74 sLARMORX's own, read, 1 thread 3.91 sLARMORX's own, read, all threads 3.96 sSimpleITK 2.5.6, read 4.71 s1.5×
  4. sub-206_task-category_run-01_bold (96×96×69×113 uint16)nibabel 5.4.2, read 0.727 sLARMORX's own, read, 1 thread 0.514 sLARMORX's own, read, all threads 0.503 sSimpleITK 2.5.6, read 0.64 s1.4×
  5. sub-f1031ax_ses-wave1bas_T1w (208×300×320 float64)nibabel 5.4.2, read 0.29 sLARMORX's own, read, 1 thread 0.272 sLARMORX's own, read, all threads 0.184 sSimpleITK 2.5.6, read 0.255 s1.1×
  6. sub-f1031ax_ses-wave1bas_task-Cuedts_acq-mb4AP_run-1_bold (90×90×60×650 int16)nibabel 5.4.2, read 3.25 sLARMORX's own, read, 1 thread 2.63 sLARMORX's own, read, all threads 2.62 sSimpleITK 2.5.6, read 3.04 s1.2×
  7. sub-f1031ax_ses-wave1bas_task-Cuedts_acq-mb4AP_run-1_sbref (90×90×60 uint16)nibabel 5.4.2, read 0.0233 sLARMORX's own, read, 1 thread 0.00386 sLARMORX's own, read, all threads 0.00448 sSimpleITK 2.5.6, read 0.0135 s6×
  8. tpl-MNI152NLin2009cAsym_res-01_T1w (193×229×193 int16)nibabel 5.4.2, read 0.157 sLARMORX's own, read, 1 thread 0.0644 sLARMORX's own, read, all threads 0.0635 sSimpleITK 2.5.6, read 0.0866 s2.4×
  9. tpl-OASIS30ANTs_res-01_T1w (216×291×256 float32)nibabel 5.4.2, read 0.212 sLARMORX's own, read, 1 thread 0.151 sLARMORX's own, read, all threads 0.167 sSimpleITK 2.5.6, read 0.23 s1.4×
0.001 s0.01 s0.1 s1 s10 s

From the benchmark report docs/benchmarks/nifti-io.json (Intel® Core™ i7-8750H CPU @ 2.20GHz, 12 logical CPUs); uncompressed files and writing are in the report.

Random testing

Random testing runs random valid inputs through nibabel and LARMORX’s own reader and writer, in long runs of several hours. The inputs come from seeded plain arithmetic (up to 32³ voxels; orientations, data types, scale factors and value ranges of every kind), the options in random combinations (how random testing works). A difference is shrunk to the smallest input and fewest options that still show it, then fixed and kept as a permanent case, registered as a defect of nibabel, or reported. The latest long run:

Random testing, LARMORX’s own reader and writer against nibabel 5.4.2, the long run of 2026-10-25 (seed 20261025, 6.2 h for 21 programs): random valid inputs and option combinations, each run through both

ProgramRandom casesExtremeOptions coveredAgreeglibcNoticesUndefinedDifferHeavyGuardUnclear
NIfTI I/OLARMORX's own3,4480483,448·······

No difference.

Every case is drawn from its tool, the run's seed and its number, and replays anywhere: how random testing works; each difference's triage: validation/difftest/triage.toml.

Known limits

RGB data types (RGB24, RGBA32) are not supported yet. The benchmark reads files fully into memory with both libraries; memory mapping is not compared.

History

  • 2026-11-08: lx.io.load_nibabel gives nibabel’s matrices of x86-64 Linux, its extended precision emulated exactly on every platform; lx.load keeps double precision everywhere (NIB-04, the register).

Data credits

The data this page shows or names: each dataset with its version, DOI and licence, from LARMORX's test-data catalog. Public-domain dedications (CC0, PDDL) ask nothing; the datasets are cited all the same.