mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 03:19:30 +08:00
Avoid circular imports
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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__
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user