import nibabel as nib image = nib.load("path_to_data/pick_an_image_filename.nii.gz") image_data = image.get_fdata()