Skip to main content

Module io

Module io 

Source
Expand description

NIfTI file I/O for WASM

Provides functions to load and save NIfTI files from/to byte arrays, suitable for use in WebAssembly where filesystem access is not available.

Structs§

NiftiData
NIfTI data loaded from bytes

Functions§

get_affine 🔒
Get affine transformation matrix from header
get_header_info 🔒
Get header info for diagnostics
is_gzip 🔒
Check if bytes are gzip compressed
load_nifti
Load a NIfTI file from bytes
load_nifti_4d
Load a 4D NIfTI file from bytes (for multi-echo data)
read_nifti_dims
Read only the dimensions from a NIfTI file header without loading volume data.
read_nifti_file
Read a NIfTI file from a filesystem path
save_nifti
Save data as NIfTI bytes
save_nifti_gz
Save data as gzipped NIfTI bytes (.nii.gz)
save_nifti_to_file
Save NIfTI data to a file