mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-19 12:40:22 +08:00
Use relative imports in skimage files
This commit is contained in:
@@ -7,7 +7,7 @@ import scipy
|
||||
|
||||
cimport cython
|
||||
cimport numpy as cnp
|
||||
from skimage.measure._ccomp cimport find_root, join_trees
|
||||
from ..measure._ccomp cimport find_root, join_trees
|
||||
|
||||
from ..util import img_as_float
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from skimage._shared.utils import deprecated
|
||||
from .._shared.utils import deprecated
|
||||
|
||||
|
||||
def join_segmentations(s1, s2):
|
||||
|
||||
@@ -8,7 +8,7 @@ from cpython cimport bool
|
||||
import numpy as np
|
||||
cimport numpy as cnp
|
||||
|
||||
from skimage.util import regular_grid
|
||||
from ..util import regular_grid
|
||||
|
||||
|
||||
def _slic_cython(double[:, :, :, ::1] image_zyx,
|
||||
@@ -32,7 +32,7 @@ def _slic_cython(double[:, :, :, ::1] image_zyx,
|
||||
spacing : 1D array of double, shape (3,)
|
||||
The voxel spacing along each image dimension. This parameter
|
||||
controls the weights of the distances along z, y, and x during
|
||||
k-means clustering.
|
||||
k-means clustering.
|
||||
slic_zero : bool
|
||||
True to run SLIC-zero, False to run original SLIC.
|
||||
|
||||
@@ -178,7 +178,7 @@ def _slic_cython(double[:, :, :, ::1] image_zyx,
|
||||
for c in range(3, n_features):
|
||||
dist_color += (image_zyx[z, y, x, c - 3] -
|
||||
segments[k, c]) ** 2
|
||||
|
||||
|
||||
# The reference implementation seems to only change
|
||||
# the color if it increases from previous iteration
|
||||
if max_dist_color[k] < dist_color:
|
||||
|
||||
@@ -5,10 +5,10 @@ import numpy as np
|
||||
from scipy import ndimage
|
||||
import warnings
|
||||
|
||||
from skimage.util import img_as_float, regular_grid
|
||||
from skimage.segmentation._slic import (_slic_cython,
|
||||
_enforce_label_connectivity_cython)
|
||||
from skimage.color import rgb2lab
|
||||
from ..util import img_as_float, regular_grid
|
||||
from ..segmentation._slic import (_slic_cython,
|
||||
_enforce_label_connectivity_cython)
|
||||
from ..color import rgb2lab
|
||||
|
||||
|
||||
def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,
|
||||
|
||||
Reference in New Issue
Block a user