Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MetaImage Format Boundary

MetaImage is a lightweight lossless boundary for header-driven volume interchange. The native facade accepts both single-file MHA and header-plus-raw MHD inputs and preserves validated shape, spacing, origin, and direction.

let image = ritk_io::read_image_native("volume.mha")?;
ritk_io::write_image_native("volume_copy.mha", &image)?;

Use MHA when one self-contained file is preferable. Use MHD with a raw payload when an external pipeline already expects separate header and voxel files. A round trip must compare shape and physical metadata in addition to voxel values. Readers construct Coeus-backed images directly on the selected native backend; writers extract host data only at the format boundary.

Example Summary

ExampleStatusFocus
Native MetaImage round tripAvailableDemonstrates MHA and MHD/raw reads and writes through the unified facade.
DICOM to NIfTI ConversionAvailableShows the same image-boundary style used by format conversion workflows.