Skip to main content

NIFTI_XYZT_UNITS

Constant NIFTI_XYZT_UNITS 

Source
pub const NIFTI_XYZT_UNITS: u8 = _; // 10u8
Expand description

xyzt_units for every file this crate writes: NIFTI_UNITS_MM | NIFTI_UNITS_SEC.

The writers take no input header to carry units over from, and everything in the crate works in millimetres, so the spatial unit is always mm. The time bits say seconds; for a 4D file whose fourth axis is not time (echoes, tensor components) that is still the conventional value, and pixdim[4] is written as 1. Leaving the field at 0 (“unknown”) fails the BIDS validator’s NIFTI_UNIT check and leaves readers guessing what the voxel sizes mean.