Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Coerce MGHImages to Nifti1Images when plotting #769

Merged
merged 4 commits into from
Jan 13, 2023

Conversation

mgxd
Copy link
Contributor

@mgxd mgxd commented Jan 11, 2023

@mgxd
Copy link
Contributor Author

mgxd commented Jan 11, 2023

This fixed the errors previously encountered in the nibabies runs
https://app.circleci.com/pipelines/github/nipreps/nibabies/383/workflows/d14784ad-3d72-4ed4-a860-a5b0a357bac9/jobs/1388

@effigies
Copy link
Member

We should report this upstream to nilearn, as well. Workaround is fine because all we care about is data/affine, but they at least used to be able to handle SpatialImages in general, so this seems like a regression.

@effigies
Copy link
Member

https://nilearn.github.io/stable/manipulating_images/input_output.html#niimg-like-objects

A string or pathlib.Path object with a file path to a Nifti or Analyse image
An SpatialImage from nibabel, ie an object exposing get_fdata() method and affine attribute, typically a Nifti1Image from nibabel.

niworkflows/viz/utils.py Outdated Show resolved Hide resolved
@effigies
Copy link
Member

I'm +1 for merging rather than relying on people not to have this specific version of nilearn.

niworkflows/viz/utils.py Outdated Show resolved Hide resolved
@effigies effigies merged commit 43a82f8 into master Jan 13, 2023
@effigies effigies deleted the fix/nii-plotting branch January 13, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants