vreg.read_nifti#

vreg.read_nifti(filepath: str)[source]#

Read volume from a NIfTI file on disk.

Parameters:

filepath (str) – filepath to the NIfTI file.

Raises:

ImportError – Error raised if nibabel is not installed.

Returns:

the volume read from file.

Return type:

Volume3D

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]’.