Skip to content

Commit 0b3a6ae

Browse files
mgxdeffigies
andcommitted
Update niworkflows/viz/utils.py
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 9ed9562 commit 0b3a6ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

niworkflows/viz/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,16 @@ def plot_registration(
341341
if cuts is None:
342342
raise NotImplementedError # TODO
343343

344-
anat_nii = _ensure_nii(anat_nii)
344+
# nilearn 0.10.0 uses Nifti-specific methods
345+
anat_nii = nb.Nifti1Image.from_image(anat_nii)
345346

346347
out_files = []
347348
if estimate_brightness:
348349
plot_params = robust_set_limits(anat_nii.get_fdata().reshape(-1), plot_params)
349350

350351
# FreeSurfer ribbon.mgz
351352
if contour:
352-
contour = _ensure_nii(contour)
353+
contour = nb.Nifti1Image.from_image(anat_nii)
353354

354355
ribbon = contour is not None and np.array_equal(
355356
np.unique(contour.get_fdata()), [0, 2, 3, 41, 42]

0 commit comments

Comments
 (0)