-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
scipy.misc.imsave is deprecated #6
Comments
Thanks for this, this is something I have been trying to overcome. Any contributions are welcome on this issue... for the time being, I recommend downgrading scipy for nii2png |
What about just doing what the documentation says, and introducing a new dependency to save images? I think that's what I did to fix this, and it worked just fine from what I can remember. |
Can confirm. I installed the imageio library and changed all scypi.misc.imsave instances to imageio.imwrite and it worked like a charm. |
imageio.imwrite seems the way to go, I've submitted a PR. |
Hi, I've been trying to get the code to run with imageio.imwrite, but get the following error:
Does anyone know the fix for this? Thanks. Best, |
I've added a PR that fixes this - it's because nibabel deprecated get_data so you have to pass it to numpy.asanyarray |
Hi, Thanks for your reply. Wouldn't it be better using nibabel's .get_fdata()? I think that's the recommended way. |
According to the scipy documentation, the
scipy.misc.imsave
function is deprecated. More so, it has been completely removed in newer scipy 1.3+ versions, so thatnii2png
now fails:However, the documentation linked above does recommend another way to save images.
The text was updated successfully, but these errors were encountered: