Skip to content

Commit

Permalink
Fix filter package shim implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Jan 16, 2015
1 parent c3ccb60 commit 6339eff
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 1 deletion.
70 changes: 69 additions & 1 deletion skimage/filter/__init__.py
Expand Up @@ -11,4 +11,72 @@
del warn
del skimage_deprecation

from ..filters import *
from ..filters.lpi_filter import inverse, wiener, LPIFilter2D
from ..filters._gaussian import gaussian_filter
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_filter
from ..filters.thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,
threshold_isodata)
from ..filters import rank
from ..filters.rank import median

from skimage._shared.utils import deprecated
from skimage 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
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_filter',
'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_filter',
'threshold_adaptive',
'threshold_otsu',
'threshold_yen',
'threshold_isodata',
'rank']
42 changes: 42 additions & 0 deletions skimage/filter/rank/__init__.py
@@ -0,0 +1,42 @@
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']

0 comments on commit 6339eff

Please sign in to comment.