loli / medpy

Medical image processing in Python
http://loli.github.io/medpy/
GNU General Public License v3.0
559 stars 136 forks source link

scipy deprecations #114

Closed raamana closed 7 months ago

raamana commented 1 year ago

thanks for sharing and maintaining medpy. Just wanted to share these deprecation warnings, that you might want to fix, they seem easy and straightforward:

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26
  /usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26: DeprecationWarning:

  Please use `distance_transform_edt` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26
  /usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26: DeprecationWarning:

  Please use `binary_erosion` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26
  /usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:26: DeprecationWarning:

  Please use `generate_binary_structure` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:28
  /usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:28: DeprecationWarning:

  Please use `label` from the `scipy.ndimage` namespace, the `scipy.ndimage.measurements` namespace is deprecated.

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:28
  /usr/local/lib/python3.11/site-packages/medpy/metric/binary.py:28: DeprecationWarning:

  Please use `find_objects` from the `scipy.ndimage` namespace, the `scipy.ndimage.measurements` namespace is deprecated.

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/histogram.py:126: 7381 warnings
graynet/tests/test_volumetric_graynet.py: 16798 warnings
  /usr/local/lib/python3.11/site-packages/medpy/metric/histogram.py:126: DeprecationWarning:

  scipy.absolute is deprecated and will be removed in SciPy 2.0.0, use numpy.absolute instead

../../../../../../usr/local/lib/python3.11/site-packages/medpy/metric/histogram.py:126: 7381 warnings
graynet/tests/test_volumetric_graynet.py: 16798 warnings
  /usr/local/lib/python3.11/site-packages/medpy/metric/histogram.py:126: DeprecationWarning:

  scipy.sum is deprecated and will be removed in SciPy 2.0.0, use numpy.sum instead
oskar-maier-ms commented 1 year ago

Thank you for noticing! This has actually been solved will #112 , but I haven't got around to create a new release yet.

For now, feel free to use the main branch version.