More robust to nibabel versions