viqa.utils.load_nifti¶
- viqa.utils.load_nifti(file_path: str | PathLike) ndarray [source]¶
Load data from a
.nii
file.- Parameters:
file_path (str or os.PathLike) – File path
- Returns:
img_arr – Numpy array containing the data
- Return type:
np.ndarray
Examples
>>> from viqa.utils import load_nifti >>> img = load_nifti("path/to/image.nii.gz")
Notes
This function wraps the nibabel function
nibabel.loadsave.load()
.