mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 17:17:07 +08:00
Removed deprecated filter module
This commit is contained in:
@@ -28,7 +28,6 @@ Version 0.13
|
||||
file (canny is now in `skimage.feature.canny`).
|
||||
* Don't forget to complete api_changes.txt.
|
||||
(`GitHub discuss <https://github.com/scikit-image/scikit-image/pull/1113>`__ )
|
||||
* Remove deprecated ``skimage.filter`` module.
|
||||
* Remove deprecated edge filters `hsobel`, `vsobel`, `hscharr`, `vscharr`,
|
||||
`hprewitt`, `vprewitt`, `roberts_positive_diagonal`,
|
||||
`roberts_negative_diagonal` in `skimage/filters/edges.py`
|
||||
@@ -36,5 +35,3 @@ Version 0.13
|
||||
involves removing the function _mode_deprecations from skimage._shared.utils
|
||||
as well as any uses of _mode_deprecations from restoration/_denoise.py,
|
||||
_shared/interpolation.pyx, transform/_geometric.py, and transform/_warps.py
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Version 0.13
|
||||
------------
|
||||
- `skimage.filter` has been removed.
|
||||
|
||||
Version 0.12
|
||||
------------
|
||||
- ``equalize_adapthist`` now takes a ``kernel_size`` keyword argument, replacing
|
||||
|
||||
@@ -192,7 +192,7 @@ def setup_test():
|
||||
|
||||
from scipy import signal, ndimage, special, optimize, linalg
|
||||
from scipy.io import loadmat
|
||||
from skimage import viewer, filter
|
||||
from skimage import viewer
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
from .._shared.utils import skimage_deprecation
|
||||
from warnings import warn
|
||||
|
||||
global _import_warned
|
||||
|
||||
warn(skimage_deprecation('The `skimage.filter` module has been renamed '
|
||||
'to `skimage.filters`. This placeholder module '
|
||||
'will be removed in v0.13.'))
|
||||
_import_warned = True
|
||||
|
||||
del warn
|
||||
del skimage_deprecation
|
||||
|
||||
from ..filters.lpi_filter import inverse, wiener, LPIFilter2D
|
||||
from ..filters._gaussian import gaussian
|
||||
from ..filters.edges import (sobel, hsobel, vsobel, sobel_h, sobel_v,
|
||||
scharr, hscharr, vscharr, scharr_h, scharr_v,
|
||||
prewitt, hprewitt, vprewitt, prewitt_h, prewitt_v,
|
||||
roberts, roberts_positive_diagonal,
|
||||
roberts_negative_diagonal, roberts_pos_diag,
|
||||
roberts_neg_diag)
|
||||
from ..filters._rank_order import rank_order
|
||||
from ..filters._gabor import gabor_kernel, gabor
|
||||
from ..filters.thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,
|
||||
threshold_isodata)
|
||||
from ..filters import rank
|
||||
from ..filters.rank import median
|
||||
|
||||
from .._shared.utils import deprecated
|
||||
from .. import restoration
|
||||
denoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\
|
||||
(restoration.denoise_bilateral)
|
||||
denoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\
|
||||
(restoration.denoise_tv_bregman)
|
||||
denoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\
|
||||
(restoration.denoise_tv_chambolle)
|
||||
|
||||
# Backward compatibility v<0.11
|
||||
|
||||
|
||||
@deprecated('skimage.feature.canny')
|
||||
def canny(*args, **kwargs):
|
||||
# Hack to avoid circular import
|
||||
from skimage.feature._canny import canny as canny_
|
||||
return canny_(*args, **kwargs)
|
||||
|
||||
|
||||
__all__ = ['inverse',
|
||||
'wiener',
|
||||
'LPIFilter2D',
|
||||
'gaussian',
|
||||
'median',
|
||||
'canny',
|
||||
'sobel',
|
||||
'hsobel',
|
||||
'vsobel',
|
||||
'sobel_h',
|
||||
'sobel_v',
|
||||
'scharr',
|
||||
'hscharr',
|
||||
'vscharr',
|
||||
'scharr_h',
|
||||
'scharr_v',
|
||||
'prewitt',
|
||||
'hprewitt',
|
||||
'vprewitt',
|
||||
'prewitt_h',
|
||||
'prewitt_v',
|
||||
'roberts',
|
||||
'roberts_positive_diagonal',
|
||||
'roberts_negative_diagonal',
|
||||
'roberts_pos_diag',
|
||||
'roberts_neg_diag',
|
||||
'denoise_tv_chambolle',
|
||||
'denoise_bilateral',
|
||||
'denoise_tv_bregman',
|
||||
'rank_order',
|
||||
'gabor_kernel',
|
||||
'gabor',
|
||||
'threshold_adaptive',
|
||||
'threshold_otsu',
|
||||
'threshold_yen',
|
||||
'threshold_isodata',
|
||||
'rank']
|
||||
@@ -1,42 +0,0 @@
|
||||
from ...filters.rank.generic import (autolevel, bottomhat, equalize, gradient, maximum, mean,
|
||||
subtract_mean, median, minimum, modal, enhance_contrast,
|
||||
pop, threshold, tophat, noise_filter, entropy, otsu,
|
||||
sum, windowed_histogram)
|
||||
from ...filters.rank._percentile import (autolevel_percentile, gradient_percentile,
|
||||
mean_percentile, subtract_mean_percentile,
|
||||
enhance_contrast_percentile, percentile,
|
||||
pop_percentile, sum_percentile, threshold_percentile)
|
||||
from ...filters.rank.bilateral import mean_bilateral, pop_bilateral, sum_bilateral
|
||||
|
||||
|
||||
__all__ = ['autolevel',
|
||||
'autolevel_percentile',
|
||||
'bottomhat',
|
||||
'equalize',
|
||||
'gradient',
|
||||
'gradient_percentile',
|
||||
'maximum',
|
||||
'mean',
|
||||
'mean_percentile',
|
||||
'mean_bilateral',
|
||||
'subtract_mean',
|
||||
'subtract_mean_percentile',
|
||||
'median',
|
||||
'minimum',
|
||||
'modal',
|
||||
'enhance_contrast',
|
||||
'enhance_contrast_percentile',
|
||||
'pop',
|
||||
'pop_percentile',
|
||||
'pop_bilateral',
|
||||
'sum',
|
||||
'sum_bilateral',
|
||||
'sum_percentile',
|
||||
'threshold',
|
||||
'threshold_percentile',
|
||||
'tophat',
|
||||
'noise_filter',
|
||||
'entropy',
|
||||
'otsu',
|
||||
'percentile',
|
||||
'windowed_histogram']
|
||||
@@ -1,17 +1,7 @@
|
||||
from warnings import catch_warnings, simplefilter
|
||||
from ..._shared._warnings import expected_warnings
|
||||
from ...data import moon
|
||||
|
||||
|
||||
def test_filter_import():
|
||||
with catch_warnings():
|
||||
simplefilter('ignore')
|
||||
from skimage import filter as F
|
||||
|
||||
assert('sobel' in dir(F))
|
||||
assert F._import_warned
|
||||
|
||||
|
||||
def test_canny_import():
|
||||
data = moon()
|
||||
with expected_warnings(['skimage.feature.canny']):
|
||||
|
||||
@@ -157,7 +157,7 @@ def erosion(image, selem=None, out=None, shift_x=False, shift_y=False):
|
||||
Notes
|
||||
-----
|
||||
For ``uint8`` (and ``uint16`` up to a certain bit-depth) data, the
|
||||
lower algorithm complexity makes the `skimage.filter.rank.minimum`
|
||||
lower algorithm complexity makes the `skimage.filters.rank.minimum`
|
||||
function more efficient for larger images and structuring elements.
|
||||
|
||||
Examples
|
||||
@@ -217,7 +217,7 @@ def dilation(image, selem=None, out=None, shift_x=False, shift_y=False):
|
||||
Notes
|
||||
-----
|
||||
For `uint8` (and `uint16` up to a certain bit-depth) data, the lower
|
||||
algorithm complexity makes the `skimage.filter.rank.maximum` function more
|
||||
algorithm complexity makes the `skimage.filters.rank.maximum` function more
|
||||
efficient for larger images and structuring elements.
|
||||
|
||||
Examples
|
||||
|
||||
Reference in New Issue
Block a user