diff --git a/niworkflows/viz/utils.py b/niworkflows/viz/utils.py index bd12b6e35b9..99b6a4e347c 100644 --- a/niworkflows/viz/utils.py +++ b/niworkflows/viz/utils.py @@ -341,11 +341,17 @@ def plot_registration( if cuts is None: raise NotImplementedError # TODO + # nilearn 0.10.0 uses Nifti-specific methods + anat_nii = nb.Nifti1Image.from_image(anat_nii) + out_files = [] if estimate_brightness: plot_params = robust_set_limits(anat_nii.get_fdata().reshape(-1), plot_params) # FreeSurfer ribbon.mgz + if contour: + contour = nb.Nifti1Image.from_image(anat_nii) + ribbon = contour is not None and np.array_equal( np.unique(contour.get_fdata()), [0, 2, 3, 41, 42] )