mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-18 12:30:14 +08:00
Use relative imports in skimage files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
import skimage
|
||||
from skimage.feature import canny
|
||||
from ...feature import canny
|
||||
from .overlayplugin import OverlayPlugin
|
||||
from ..widgets import Slider, ComboBox
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from skimage import color
|
||||
from skimage import exposure
|
||||
from ... import color, exposure
|
||||
from .plotplugin import PlotPlugin
|
||||
from ..canvastools import RectangleTool
|
||||
|
||||
@@ -92,4 +91,3 @@ def pct_total_area(image, percentile=0.80):
|
||||
idx = int((image.size - 1) * percentile)
|
||||
sorted_pixels = np.sort(image.flat)
|
||||
return sorted_pixels[idx]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from .base import Plugin
|
||||
from ..canvastools import RectangleTool
|
||||
from skimage.viewer.widgets import SaveButtons
|
||||
from ...viewer.widgets import SaveButtons
|
||||
|
||||
|
||||
__all__ = ['Crop']
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
from __future__ import division
|
||||
|
||||
import numpy as np
|
||||
from skimage.util.dtype import dtype_range
|
||||
from skimage import draw
|
||||
from skimage import measure
|
||||
from ...util.dtype import dtype_range
|
||||
from ... import draw, measure
|
||||
|
||||
from .plotplugin import PlotPlugin
|
||||
from ..canvastools import ThickLineTool
|
||||
@@ -65,7 +64,7 @@ class LineProfile(PlotPlugin):
|
||||
on_change=self.line_changed)
|
||||
self.line_tool.end_points = np.transpose([x, y])
|
||||
|
||||
scan_data = measure.profile_line(image,
|
||||
scan_data = measure.profile_line(image,
|
||||
*self.line_tool.end_points[:, ::-1])
|
||||
self.scan_data = scan_data
|
||||
if scan_data.ndim == 1:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from warnings import warn
|
||||
|
||||
from skimage.util.dtype import dtype_range
|
||||
from ...util.dtype import dtype_range
|
||||
from .base import Plugin
|
||||
from ..utils import ClearColormap, update_axes_image
|
||||
|
||||
import six
|
||||
from skimage._shared.version_requirements import is_installed
|
||||
from ..._shared.version_requirements import is_installed
|
||||
|
||||
|
||||
__all__ = ['OverlayPlugin']
|
||||
|
||||
Reference in New Issue
Block a user