nifti_write — FILEIO nifti op

• Data kinds: any → any

• Call: import fullseye as fs; fs.ledger.nifti_write(volume, *, meta, compressed) (to call the implementation directly, import fileio; fileio.nifti_write(volume, *, meta, compressed); from the registry, opsfileio.get("nifti_write"))

• GPU: none (CPU reference implementation only)

Usage

Write a 3-D/4-D array with affine/pixdim as single-file NIfTI-1 bytes.

> The detailed description below is the original text — the summary and the headings are translated.

meta は affine と spatial_unit(m/mm/um)を必須とし、4-D では time_step と time_unit も必須。qform と sform の両方へ同じ affine を書く。compressed で .nii / .nii.gz 相当を選ぶ。呼び出し例:

nifti_write(vol, meta={"affine": affine, "spatial_unit": "mm"}, compressed=True)。

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• fileio_scientific_roundtrip — py -3.11 examples/fileio_scientific_roundtrip.py

Ops the type connects to (they accept any as input)

table_write_csv · table_read_csv · mesh_write_ply · mesh_read_ply · mesh_write_stl · mesh_read_stl · mesh_write_obj · mesh_read_obj

Same category (nifti)

nifti_read


*Provenance: fileio.py — FILEIO operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.