Avoid circular imports

This commit is contained in:
Stefan van der Walt
2014-05-25 20:05:17 +02:00
parent 4da4ec5b89
commit 135965fbe4
6 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ from ._moments import moments, moments_central, moments_normalized, moments_hu
from .profile import profile_line
from .fit import LineModel, CircleModel, EllipseModel, ransac
from .block import block_reduce
from ._ccomp import label
from ._label import label
__all__ = ['find_contours',
+6
View File
@@ -0,0 +1,6 @@
from ._ccomp import label as _label
def label(input, neighbors=8, background=None, return_num=False):
return _label(input, neighbors, background, return_num)
label.__doc__ = _label.__doc__
+2 -2
View File
@@ -4,8 +4,7 @@ from math import sqrt, atan2, pi as PI
import numpy as np
from scipy import ndimage
from ..morphology.convex_hull import convex_hull_image
from ._ccomp import label
from ._label import label
from . import _moments
@@ -136,6 +135,7 @@ class _RegionProperties(object):
@_cached_property
def convex_image(self):
from ..morphology.convex_hull import convex_hull_image
return convex_hull_image(self.image)
@_cached_property
+5 -1
View File
@@ -4,13 +4,17 @@ from .grey import (erosion, dilation, opening, closing, white_tophat,
black_tophat)
from .selem import (square, rectangle, diamond, disk, cube, octahedron, ball,
octagon, star)
from ._label import label
from .watershed import watershed
from ._skeletonize import skeletonize, medial_axis
from .convex_hull import convex_hull_image, convex_hull_object
from .greyreconstruct import reconstruction
from .misc import remove_small_objects
from ..measure._label import label
from skimage._shared.utils import deprecated as _deprecated
label = _deprecated('skimage.measure.label')(label)
__all__ = ['binary_erosion',
'binary_dilation',
'binary_opening',
-6
View File
@@ -1,6 +0,0 @@
__all__ = ['label']
from ..measure._ccomp import label as _label
from skimage._shared.utils import deprecated
label = deprecated('skimage.measure.label')(_label)
+1 -1
View File
@@ -3,7 +3,7 @@ __all__ = ['convex_hull_image', 'convex_hull_object']
import numpy as np
from ._pnpoly import grid_points_inside_poly
from ._convex_hull import possible_hull
from ..measure._ccomp import label
from ..measure._label import label
from skimage.util import unique_rows