FNNDSC / FNNDSC/med2image

Nibabel error

Open
#42 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
205
Forks
57
PR merge metrics
No merged PRs in 30d

Description

I think the latest version of Nibabel is not supported as it yields the following error
```
File "/home/gupta/miniconda3/envs/game/bin/med2image", line 363, in
imgConverter = med2image.object_factoryCreate(args).C_convert
File "/home/gupta/miniconda3/envs/game/lib/python3.8/site-packages/med2image/med2image.py", line 799, in __init__
self.C_convert = med2image_nii(
File "/home/gupta/miniconda3/envs/game/lib/python3.8/site-packages/med2image/med2image.py", line 675, in __init__
data = nimg.get_data()
File "/home/gupta/miniconda3/envs/game/lib/python3.8/site-packages/nibabel/deprecator.py", line 208, in deprecated_func
raise exception(message)
nibabel.deprecator.ExpiredDeprecationError: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

* deprecated from version: 3.0
* Raises as of version: 5.0

```

If I roll back to nibabel 5.0.0 the error disappears. I think appropriate versions of dependencies should be mentioned in the setup.py file.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported error with the current Nibabel version, then inspect setup.py and the med2image.py code at the reported line 675. Confirm which dependency versions are supported and whether the conversion succeeds without the ExpiredDeprecationError; done means the supported dependency range or compatibility behavior is documented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.