Skip to content

Commit 9ed9562

Browse files
mgxdeffigies
authored andcommitted
FIX: Ensure contour is also nii
1 parent c3b2c0f commit 9ed9562

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

niworkflows/viz/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ def plot_registration(
348348
plot_params = robust_set_limits(anat_nii.get_fdata().reshape(-1), plot_params)
349349

350350
# FreeSurfer ribbon.mgz
351+
if contour:
352+
contour = _ensure_nii(contour)
353+
351354
ribbon = contour is not None and np.array_equal(
352355
np.unique(contour.get_fdata()), [0, 2, 3, 41, 42]
353356
)

0 commit comments

Comments
 (0)