neuromaps.images.load_nifti

neuromaps.images.load_nifti(img)[source]

Load nifti file img.

If img is already a loaded (i.e. is a nib.Nifti1Image object), it is returned as-is.

Parameters:

img (os.PathLike or nib.Nifti1Image object) – Image to be loaded

Returns:

img – Loaded NIFTI image

Return type:

nib.Nifti1Image