ENH: Rename convex_hull to convex_hull_image to allow later clean API addition of convex_hull with labels.

This commit is contained in:
Stefan van der Walt
2011-11-02 09:38:54 -07:00
parent 33469fa69e
commit 3495767358
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -3,4 +3,4 @@ from selem import *
from .ccomp import label
from watershed import watershed, is_local_maximum
from skeletonize import skeletonize, medial_axis
from .convex_hull import convex_hull
from .convex_hull import convex_hull_image
+3 -3
View File
@@ -1,11 +1,11 @@
__all__ = ['convex_hull']
__all__ = ['convex_hull_image']
import numpy as np
from ._pnpoly import points_inside_poly, grid_points_inside_poly
from ._convex_hull import possible_hull
def convex_hull(image):
"""Compute the convex hull of a binary image.
def convex_hull_image(image):
"""Compute the convex hull image of a binary image.
The convex hull is the set of pixels included in the smallest convex
polygon that surround all white pixels in the input image.
+2 -2
View File
@@ -1,7 +1,7 @@
import numpy as np
from numpy.testing import assert_array_equal
from numpy.testing.decorators import skipif
from skimage.morphology import convex_hull
from skimage.morphology import convex_hull_image
from skimage.morphology._convex_hull import possible_hull
try:
@@ -28,7 +28,7 @@ def test_basic():
[0, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
assert_array_equal(convex_hull(image), expected)
assert_array_equal(convex_hull_image(image), expected)
@skipif(not scipy_spatial)
def test_possible_hull():