From 17f202b013b10b5082654e223f5ad34b05e77e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 15:40:36 +0200 Subject: [PATCH 01/16] Add __all__ to color package --- skimage/color/__init__.py | 11 +++++++++++ skimage/color/colorconv.py | 14 -------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/skimage/color/__init__.py b/skimage/color/__init__.py index 08b5f739..a4205e3b 100644 --- a/skimage/color/__init__.py +++ b/skimage/color/__init__.py @@ -1 +1,12 @@ from .colorconv import * + +__all__ = ['convert_colorspace', 'rgb2hsv', 'hsv2rgb', 'rgb2xyz', 'xyz2rgb', + 'rgb2rgbcie', 'rgbcie2rgb', 'rgb2grey', 'rgb2gray', 'gray2rgb', + 'xyz2lab', 'lab2xyz', 'lab2rgb', 'rgb2lab', 'rgb2hed', 'hed2rgb', + 'separate_stains', 'combine_stains', 'rgb_from_hed', 'hed_from_rgb', + 'rgb_from_hdx', 'hdx_from_rgb', 'rgb_from_fgx', 'fgx_from_rgb', + 'rgb_from_bex', 'bex_from_rgb', 'rgb_from_rbd', 'rbd_from_rgb', + 'rgb_from_gdx', 'gdx_from_rgb', 'rgb_from_hax', 'hax_from_rgb', + 'rgb_from_bro', 'bro_from_rgb', 'rgb_from_bpx', 'bpx_from_rgb', + 'rgb_from_ahx', 'ahx_from_rgb', 'rgb_from_hpx', 'hpx_from_rgb', + 'is_rgb', 'is_gray'] diff --git a/skimage/color/colorconv.py b/skimage/color/colorconv.py index fc9ab342..11f11630 100644 --- a/skimage/color/colorconv.py +++ b/skimage/color/colorconv.py @@ -43,20 +43,6 @@ References from __future__ import division -__all__ = ['convert_colorspace', 'rgb2hsv', 'hsv2rgb', 'rgb2xyz', 'xyz2rgb', - 'rgb2rgbcie', 'rgbcie2rgb', 'rgb2grey', 'rgb2gray', 'gray2rgb', - 'xyz2lab', 'lab2xyz', 'lab2rgb', 'rgb2lab', 'rgb2hed', 'hed2rgb', - 'separate_stains', 'combine_stains', 'rgb_from_hed', 'hed_from_rgb', - 'rgb_from_hdx', 'hdx_from_rgb', 'rgb_from_fgx', 'fgx_from_rgb', - 'rgb_from_bex', 'bex_from_rgb', 'rgb_from_rbd', 'rbd_from_rgb', - 'rgb_from_gdx', 'gdx_from_rgb', 'rgb_from_hax', 'hax_from_rgb', - 'rgb_from_bro', 'bro_from_rgb', 'rgb_from_bpx', 'bpx_from_rgb', - 'rgb_from_ahx', 'ahx_from_rgb', 'rgb_from_hpx', 'hpx_from_rgb', - 'is_rgb', 'is_gray' - ] - -__docformat__ = "restructuredtext en" - import numpy as np from scipy import linalg from ..util import dtype From 36a915d5c116ac9c1067ba1cdd079d0c27054b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 15:41:50 +0200 Subject: [PATCH 02/16] Add __all__ to exposure package --- skimage/exposure/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/skimage/exposure/__init__.py b/skimage/exposure/__init__.py index 3d1aebe4..aba05dae 100644 --- a/skimage/exposure/__init__.py +++ b/skimage/exposure/__init__.py @@ -1,3 +1,10 @@ from .exposure import histogram, equalize, equalize_hist, \ rescale_intensity, cumulative_distribution from ._adapthist import equalize_adapthist + +__all__ = ['histogram', + 'equalize', + 'equalize_hist', + 'equalize_adapthist', + 'rescale_intensity', + 'cumulative_distribution'] From 4fce7b3b5527a824ddb8cbfe2d0130f703e74ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:06:41 +0200 Subject: [PATCH 03/16] Explicitly import color functions --- skimage/color/__init__.py | 95 ++++++++++++++++++++++++++++++++++----- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/skimage/color/__init__.py b/skimage/color/__init__.py index a4205e3b..52d6e760 100644 --- a/skimage/color/__init__.py +++ b/skimage/color/__init__.py @@ -1,12 +1,85 @@ -from .colorconv import * +from .colorconv import (convert_colorspace, + rgb2hsv, + hsv2rgb, + rgb2xyz, + xyz2rgb, + rgb2rgbcie, + rgbcie2rgb, + rgb2grey, + rgb2gray, + gray2rgb, + xyz2lab, + lab2xyz, + lab2rgb, + rgb2lab, + rgb2hed, + hed2rgb, + separate_stains, + combine_stains, + rgb_from_hed, + hed_from_rgb, + rgb_from_hdx, + hdx_from_rgb, + rgb_from_fgx, + fgx_from_rgb, + rgb_from_bex, + bex_from_rgb, + rgb_from_rbd, + rbd_from_rgb, + rgb_from_gdx, + gdx_from_rgb, + rgb_from_hax, + hax_from_rgb, + rgb_from_bro, + bro_from_rgb, + rgb_from_bpx, + bpx_from_rgb, + rgb_from_ahx, + ahx_from_rgb, + rgb_from_hpx, + hpx_from_rgb, + is_rgb, + is_gray) -__all__ = ['convert_colorspace', 'rgb2hsv', 'hsv2rgb', 'rgb2xyz', 'xyz2rgb', - 'rgb2rgbcie', 'rgbcie2rgb', 'rgb2grey', 'rgb2gray', 'gray2rgb', - 'xyz2lab', 'lab2xyz', 'lab2rgb', 'rgb2lab', 'rgb2hed', 'hed2rgb', - 'separate_stains', 'combine_stains', 'rgb_from_hed', 'hed_from_rgb', - 'rgb_from_hdx', 'hdx_from_rgb', 'rgb_from_fgx', 'fgx_from_rgb', - 'rgb_from_bex', 'bex_from_rgb', 'rgb_from_rbd', 'rbd_from_rgb', - 'rgb_from_gdx', 'gdx_from_rgb', 'rgb_from_hax', 'hax_from_rgb', - 'rgb_from_bro', 'bro_from_rgb', 'rgb_from_bpx', 'bpx_from_rgb', - 'rgb_from_ahx', 'ahx_from_rgb', 'rgb_from_hpx', 'hpx_from_rgb', - 'is_rgb', 'is_gray'] +__all__ = ['convert_colorspace', + 'rgb2hsv', + 'hsv2rgb', + 'rgb2xyz', + 'xyz2rgb', + 'rgb2rgbcie', + 'rgbcie2rgb', + 'rgb2grey', + 'rgb2gray', + 'gray2rgb', + 'xyz2lab', + 'lab2xyz', + 'lab2rgb', + 'rgb2lab', + 'rgb2hed', + 'hed2rgb', + 'separate_stains', + 'combine_stains', + 'rgb_from_hed', + 'hed_from_rgb', + 'rgb_from_hdx', + 'hdx_from_rgb', + 'rgb_from_fgx', + 'fgx_from_rgb', + 'rgb_from_bex', + 'bex_from_rgb', + 'rgb_from_rbd', + 'rbd_from_rgb', + 'rgb_from_gdx', + 'gdx_from_rgb', + 'rgb_from_hax', + 'hax_from_rgb', + 'rgb_from_bro', + 'bro_from_rgb', + 'rgb_from_bpx', + 'bpx_from_rgb', + 'rgb_from_ahx', + 'ahx_from_rgb', + 'rgb_from_hpx', + 'hpx_from_rgb', + 'is_rgb', + 'is_gray'] From 89f0c0c1b52618303e1eae2037004e7f65275440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:09:06 +0200 Subject: [PATCH 04/16] Add __all__ to data package --- skimage/data/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/skimage/data/__init__.py b/skimage/data/__init__.py index ac55557f..07d2688d 100644 --- a/skimage/data/__init__.py +++ b/skimage/data/__init__.py @@ -12,6 +12,20 @@ from ..io import imread from skimage import data_dir +__all__ = ['load', + 'camera', + 'lena', + 'text', + 'checkerboard', + 'coins', + 'moon', + 'page', + 'horse', + 'clock', + 'immunohistochemistry', + 'chelsea'] + + def load(f): """Load an image file located in the data directory. From 94e7fb9821d904dba19fee1ca1d129259f33204e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:16:53 +0200 Subject: [PATCH 05/16] Add __all__ to draw package --- skimage/draw/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/skimage/draw/__init__.py b/skimage/draw/__init__.py index 0cb0b72a..a5ba8869 100644 --- a/skimage/draw/__init__.py +++ b/skimage/draw/__init__.py @@ -1,2 +1,11 @@ from ._draw import line, polygon, ellipse, ellipse_perimeter, \ circle, circle_perimeter, set_color, bresenham + +__all__ = ['line', + 'polygon', + 'ellipse', + 'ellipse_perimeter', + 'circle', + 'circle_perimeter', + 'set_color', + 'bresenham'] From 2ba3dd9bafddd4dfd1ab712c59c6efadd58b1f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:18:41 +0200 Subject: [PATCH 06/16] Add __all__ to feature package --- skimage/feature/__init__.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/skimage/feature/__init__.py b/skimage/feature/__init__.py index 9f1e5f92..09ac4540 100644 --- a/skimage/feature/__init__.py +++ b/skimage/feature/__init__.py @@ -6,3 +6,19 @@ from .corner import (corner_kitchen_rosenfeld, corner_harris, corner_shi_tomasi, corner_foerstner, corner_subpix, corner_peaks) from .corner_cy import corner_moravec from .template import match_template + + +__all__ = ['daisy', + 'hog', + 'greycomatrix', + 'greycoprops', + 'local_binary_pattern', + 'peak_local_max', + 'corner_kitchen_rosenfeld', + 'corner_harris', + 'corner_shi_tomasi', + 'corner_foerstner', + 'corner_subpix', + 'corner_peaks', + 'corner_moravec', + 'match_template'] From 702c1773b76e082854f660687111ce45341823eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:22:32 +0200 Subject: [PATCH 07/16] Add __all__ to filter package --- skimage/filter/__init__.py | 30 +++++++++++++++++++++++++++++- skimage/filter/lpi_filter.py | 3 --- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py index 5479af5d..ef8460a5 100644 --- a/skimage/filter/__init__.py +++ b/skimage/filter/__init__.py @@ -1,4 +1,4 @@ -from .lpi_filter import * +from .lpi_filter import inverse, wiener, LPIFilter2D from .ctmf import median_filter from ._canny import canny from .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt, @@ -9,3 +9,31 @@ from ._denoise_cy import denoise_bilateral, denoise_tv_bregman from ._rank_order import rank_order from ._gabor import gabor_kernel, gabor_filter from .thresholding import threshold_otsu, threshold_adaptive + + +__all__ = ['inverse', + 'wiener', + 'LPIFilter2D', + 'median_filter', + 'canny', + 'sobel', + 'hsobel', + 'vsobel', + 'scharr', + 'hscharr', + 'vscharr', + 'prewitt', + 'hprewitt', + 'vprewitt', + 'roberts', + 'roberts_positive_diagonal', + 'roberts_negative_diagonal', + 'denoise_tv_chambolle', + 'tv_denoise', + 'denoise_bilateral', + 'denoise_tv_bregman', + 'rank_order', + 'gabor_kernel', + 'gabor_filter', + 'threshold_otsu', + 'threshold_adaptive'] diff --git a/skimage/filter/lpi_filter.py b/skimage/filter/lpi_filter.py index 2af74d7a..b3755a8b 100644 --- a/skimage/filter/lpi_filter.py +++ b/skimage/filter/lpi_filter.py @@ -3,9 +3,6 @@ :license: modified BSD """ -__all__ = ['inverse', 'wiener', 'LPIFilter2D'] -__docformat__ = 'restructuredtext en' - import numpy as np from scipy.fftpack import ifftshift From 927d91239e9e374b36fead2f5c2e76b95f27b069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:26:01 +0200 Subject: [PATCH 08/16] Add __all__ to rank filter package --- skimage/filter/rank/__init__.py | 40 ++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/skimage/filter/rank/__init__.py b/skimage/filter/rank/__init__.py index 30d936db..8f632469 100644 --- a/skimage/filter/rank/__init__.py +++ b/skimage/filter/rank/__init__.py @@ -1,3 +1,37 @@ -from .rank import * -from .percentile_rank import * -from .bilateral_rank import * +from .rank import (autolevel, bottomhat, equalize, gradient, maximum, mean, + meansubstraction, median, minimum, modal, morph_contr_enh, + pop, threshold, tophat, noise_filter, entropy, otsu) +from .percentile_rank import (percentile_autolevel, percentile_gradient, + percentile_mean, percentile_mean_substraction, + percentile_morph_contr_enh, percentile, + percentile_pop, percentile_threshold) +from .bilateral_rank import bilateral_mean, bilateral_pop + + +__all__ = ['autolevel', + 'bottomhat', + 'equalize', + 'gradient', + 'maximum', + 'mean', + 'meansubstraction', + 'median', + 'minimum', + 'modal', + 'morph_contr_enh', + 'pop', + 'threshold', + 'tophat', + 'noise_filter', + 'entropy', + 'otsu', + 'percentile_autolevel', + 'percentile_gradient', + 'percentile_mean', + 'percentile_mean_substraction', + 'percentile_morph_contr_enh', + 'percentile', + 'percentile_pop', + 'percentile_threshold', + 'bilateral_mean', + 'bilateral_pop'] From 3e278fadb45d04610623d900738a65c540dadccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:27:00 +0200 Subject: [PATCH 09/16] Add __all__ to graph package --- skimage/graph/__init__.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/skimage/graph/__init__.py b/skimage/graph/__init__.py index 9e2ac4e0..eb817c77 100644 --- a/skimage/graph/__init__.py +++ b/skimage/graph/__init__.py @@ -1,10 +1,7 @@ -try: - from .spath import shortest_path - from .mcp import MCP, MCP_Geometric, route_through_array -except ImportError: - print """*** The cython extensions have not been compiled. Run +from .spath import shortest_path +from .mcp import MCP, MCP_Geometric, route_through_array -python setup.py build_ext -i - -in the source directory to build in-place. Please refer to INSTALL.txt -for further detail.""" +__all__ = ['shortest_path', + 'MCP', + 'MCP_Geometric', + 'route_through_array'] \ No newline at end of file From 9d4647dca6f5e356f807d6885019d41a4b6d4847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:28:08 +0200 Subject: [PATCH 10/16] Add __all__ to measure package --- skimage/measure/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/skimage/measure/__init__.py b/skimage/measure/__init__.py index 1c92d9ee..226c4235 100755 --- a/skimage/measure/__init__.py +++ b/skimage/measure/__init__.py @@ -1,4 +1,11 @@ from .find_contours import find_contours from ._regionprops import regionprops, perimeter from ._structural_similarity import structural_similarity -from ._polygon import approximate_polygon, subdivide_polygon \ No newline at end of file +from ._polygon import approximate_polygon, subdivide_polygon + +__all__ = ['find_contours', + 'regionprops', + 'perimeter', + 'structural_similarity', + 'approximate_polygon', + 'subdivide_polygon'] From 6cae50cd400fec3a99f72fd9b60cf3a2cce0db24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:31:58 +0200 Subject: [PATCH 11/16] Add __all__ to morphology package --- skimage/morphology/__init__.py | 40 ++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/skimage/morphology/__init__.py b/skimage/morphology/__init__.py index 044fcf89..2cbfcd37 100644 --- a/skimage/morphology/__init__.py +++ b/skimage/morphology/__init__.py @@ -1,10 +1,46 @@ from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) -from .grey import * -from .selem import * +from .grey import (erosion, dilation, opening, closing, white_tophat, + black_tophat, greyscale_erode, greyscale_dilate, + greyscale_open, greyscale_close, greyscale_white_top_hat, + greyscale_black_top_hat) +from .selem import square, rectangle, diamond, disk, cube, octahedron, ball from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import convex_hull_image from .greyreconstruct import reconstruction from .misc import remove_small_objects + + +__all__ = ['binary_erosion', + 'binary_dilation', + 'binary_opening', + 'binary_closing', + 'erosion', + 'dilation', + 'opening', + 'closing', + 'white_tophat', + 'black_tophat', + 'greyscale_erode', + 'greyscale_dilate', + 'greyscale_open', + 'greyscale_close', + 'greyscale_white_top_hat', + 'greyscale_black_top_hat', + 'square', + 'rectangle', + 'diamond', + 'disk', + 'cube', + 'octahedron', + 'ball', + 'label', + 'watershed', + 'is_local_maximum', + 'skeletonize', + 'medial_axis', + 'convex_hull_image', + 'reconstruction', + 'remove_small_objects'] From 69eafa95df4bdeb143d40c321f0a312d06efff1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:33:11 +0200 Subject: [PATCH 12/16] Add __all__ to segmentation package --- skimage/segmentation/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skimage/segmentation/__init__.py b/skimage/segmentation/__init__.py index a0fab77a..c3aa1afc 100644 --- a/skimage/segmentation/__init__.py +++ b/skimage/segmentation/__init__.py @@ -5,3 +5,15 @@ from ._quickshift import quickshift from .boundaries import find_boundaries, visualize_boundaries, mark_boundaries from ._clear_border import clear_border from ._join import join_segmentations, relabel_from_one + + +__all__ = ['random_walker', + 'felzenszwalb', + 'slic', + 'quickshift', + 'find_boundaries', + 'visualize_boundaries', + 'mark_boundaries', + 'clear_border', + 'join_segmentations', + 'relabel_from_one'] From 4da0084604817c3a13971016a1a8109933a6a521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:40:22 +0200 Subject: [PATCH 13/16] Add __all__ to transform package --- skimage/transform/__init__.py | 44 +++++++++++++++++---- skimage/transform/finite_radon_transform.py | 1 - 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/skimage/transform/__init__.py b/skimage/transform/__init__.py index 92858010..c1db3b45 100644 --- a/skimage/transform/__init__.py +++ b/skimage/transform/__init__.py @@ -1,10 +1,10 @@ -from ._hough_transform import (hough_circle, - hough_line, - probabilistic_hough_line) -from .hough_transform import * -from .radon_transform import * -from .finite_radon_transform import * -from .integral import * +from ._hough_transform import (hough_circle, hough_line, + probabilistic_hough_line) +from .hough_transform import (hough, probabilistic_hough, hough_peaks, + hough_line_peaks) +from .radon_transform import radon, iradon +from .finite_radon_transform import frt2, ifrt2 +from .integral import integral_image, integrate from ._geometric import (warp, warp_coords, estimate_transform, SimilarityTransform, AffineTransform, ProjectiveTransform, PolynomialTransform, @@ -12,3 +12,33 @@ from ._geometric import (warp, warp_coords, estimate_transform, from ._warps import swirl, resize, rotate, rescale from .pyramids import (pyramid_reduce, pyramid_expand, pyramid_gaussian, pyramid_laplacian) + + +__all__ = ['hough_circle', + 'hough_line', + 'probabilistic_hough_line' + 'hough', + 'probabilistic_hough', + 'hough_peaks', + 'hough_line_peaks', + 'radon', + 'iradon', + 'frt2', + 'ifrt2', + 'integral_image', 'integrate', + 'warp', + 'warp_coords', + 'estimate_transform', + 'SimilarityTransform', + 'AffineTransform', + 'ProjectiveTransform', + 'PolynomialTransform', + 'PiecewiseAffineTransform', + 'swirl', + 'resize', + 'rotate', + 'rescale', + 'pyramid_reduce', + 'pyramid_expand', + 'pyramid_gaussian', + 'pyramid_laplacian'] diff --git a/skimage/transform/finite_radon_transform.py b/skimage/transform/finite_radon_transform.py index c107546f..dd3bad33 100644 --- a/skimage/transform/finite_radon_transform.py +++ b/skimage/transform/finite_radon_transform.py @@ -4,7 +4,6 @@ """ __all__ = ["frt2", "ifrt2"] -__docformat__ = "restructuredtext en" import numpy as np from numpy import roll, newaxis From c10f8d300b5ff53f6b4b6985758d880025b4e7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:41:47 +0200 Subject: [PATCH 14/16] Add __all__ to util package --- skimage/util/__init__.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/skimage/util/__init__.py b/skimage/util/__init__.py index 8daaa60d..7e41627b 100644 --- a/skimage/util/__init__.py +++ b/skimage/util/__init__.py @@ -1,2 +1,13 @@ -from .dtype import * -from .shape import * +from .dtype import (img_as_float, img_as_int, img_as_uint, img_as_ubyte, + img_as_bool, dtype_limits) +from .shape import view_as_blocks, view_as_windows + + +__all__ = ['img_as_float', + 'img_as_int', + 'img_as_uint', + 'img_as_ubyte', + 'img_as_bool', + 'dtype_limits', + 'view_as_blocks', + 'view_as_windows'] From 8080e044849490eb758c5db689ef12f8f17216e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 17:59:16 +0200 Subject: [PATCH 15/16] Fix selem test cases --- skimage/morphology/tests/test_selem.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/skimage/morphology/tests/test_selem.py b/skimage/morphology/tests/test_selem.py index ccaf43a0..9a8ca895 100644 --- a/skimage/morphology/tests/test_selem.py +++ b/skimage/morphology/tests/test_selem.py @@ -8,7 +8,7 @@ from numpy.testing import * from skimage import data_dir from skimage.io import * from skimage import data_dir -from skimage.morphology import * +from skimage.morphology import selem class TestSElem(): @@ -36,7 +36,7 @@ class TestSElem(): expected_mask = expected_mask[:, np.newaxis] assert_equal(expected_mask, actual_mask) k = k + 1 - + def strel_worker_3d(self, fn, func): matlab_masks = np.load(os.path.join(data_dir, fn)) k = 0 @@ -48,20 +48,24 @@ class TestSElem(): # Test center slice for each dimension. This gives a good # indication of validity without the need for a 3D reference # mask. - c = int(expected_mask.shape[0]/2) + c = int(expected_mask.shape[0]/2) assert_equal(expected_mask, actual_mask[c,:,:]) assert_equal(expected_mask, actual_mask[:,c,:]) assert_equal(expected_mask, actual_mask[:,:,c]) k = k + 1 - + def test_selem_disk(self): self.strel_worker("disk-matlab-output.npz", selem.disk) def test_selem_diamond(self): self.strel_worker("diamond-matlab-output.npz", selem.diamond) - + def test_selem_ball(self): self.strel_worker_3d("disk-matlab-output.npz", selem.ball) def test_selem_octahedron(self): self.strel_worker_3d("diamond-matlab-output.npz", selem.octahedron) + + +if __name__ == '__main__': + np.testing.run_module_suite() From 7fa041625038db2041df4f061f219f5bcc5c712f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sat, 27 Apr 2013 18:02:14 +0200 Subject: [PATCH 16/16] Fix hough transform test cases --- skimage/transform/__init__.py | 5 +++-- skimage/transform/hough_transform.py | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/skimage/transform/__init__.py b/skimage/transform/__init__.py index c1db3b45..859c7515 100644 --- a/skimage/transform/__init__.py +++ b/skimage/transform/__init__.py @@ -16,7 +16,7 @@ from .pyramids import (pyramid_reduce, pyramid_expand, __all__ = ['hough_circle', 'hough_line', - 'probabilistic_hough_line' + 'probabilistic_hough_line', 'hough', 'probabilistic_hough', 'hough_peaks', @@ -25,7 +25,8 @@ __all__ = ['hough_circle', 'iradon', 'frt2', 'ifrt2', - 'integral_image', 'integrate', + 'integral_image', + 'integrate', 'warp', 'warp_coords', 'estimate_transform', diff --git a/skimage/transform/hough_transform.py b/skimage/transform/hough_transform.py index a3c010cd..15968fd8 100644 --- a/skimage/transform/hough_transform.py +++ b/skimage/transform/hough_transform.py @@ -1,5 +1,3 @@ -__all__ = ['hough_line_peaks'] - import numpy as np from scipy import ndimage from skimage import measure, morphology