vreg.write_nifti#

vreg.write_nifti(vol: Volume3D, filepath: str)[source]#

Write volume to disk in NIfTI format.

Parameters:
  • vol (Volume3D) – the volume to write.

  • filepath (str) – filepath to the NIfTI file.

Raises:

ImportError – Error raised if nibabel is not installed.

Note

This requires a separate installation of the optional nibabel package, either via ‘pip install nibabel’ or by installing vreg with the rw option ‘pip install vreg[rw]’.