diff --git a/doc/examples/plot_segmentations.py b/doc/examples/plot_segmentations.py index 31dc38e7..418a0903 100644 --- a/doc/examples/plot_segmentations.py +++ b/doc/examples/plot_segmentations.py @@ -64,7 +64,7 @@ import numpy as np from skimage.data import lena from skimage.segmentation import felzenszwalb, slic, quickshift -from skimage.segmentation import highlight_boundaries +from skimage.segmentation import mark_boundaries from skimage.util import img_as_float img = img_as_float(lena()[::2, ::2]) @@ -80,11 +80,11 @@ fig, ax = plt.subplots(1, 3) fig.set_size_inches(8, 3, forward=True) plt.subplots_adjust(0.05, 0.05, 0.95, 0.95, 0.05, 0.05) -ax[0].imshow(highlight_boundaries(img, segments_fz)) +ax[0].imshow(mark_boundaries(img, segments_fz)) ax[0].set_title("Felzenszwalbs's method") -ax[1].imshow(highlight_boundaries(img, segments_slic)) +ax[1].imshow(mark_boundaries(img, segments_slic)) ax[1].set_title("SLIC") -ax[2].imshow(highlight_boundaries(img, segments_quick)) +ax[2].imshow(mark_boundaries(img, segments_quick)) ax[2].set_title("Quickshift") for a in ax: a.set_xticks(()) diff --git a/skimage/segmentation/__init__.py b/skimage/segmentation/__init__.py index ce0bfd84..7bd37026 100644 --- a/skimage/segmentation/__init__.py +++ b/skimage/segmentation/__init__.py @@ -2,6 +2,5 @@ from .random_walker_segmentation import random_walker from ._felzenszwalb import felzenszwalb from ._slic import slic from ._quickshift import quickshift -from .boundaries import (find_boundaries, visualize_boundaries, - highlight_boundaries) +from .boundaries import find_boundaries, visualize_boundaries, mark_boundaries from ._clear_border import clear_border diff --git a/skimage/segmentation/boundaries.py b/skimage/segmentation/boundaries.py index d30a8627..25656a9b 100644 --- a/skimage/segmentation/boundaries.py +++ b/skimage/segmentation/boundaries.py @@ -13,7 +13,7 @@ def find_boundaries(label_img): return boundaries -def highlight_boundaries(image, label_img, color=(1, 1, 0), outline_color=None): +def mark_boundaries(image, label_img, color=(1, 1, 0), outline_color=None): """Return image with boundaries between labeled regions highlighted. Parameters @@ -40,6 +40,6 @@ def highlight_boundaries(image, label_img, color=(1, 1, 0), outline_color=None): return image -@deprecated('highlight_boundaries') +@deprecated('mark_boundaries') def visualize_boundaries(*args, **kwargs): - return highlight_boundaries(*args, **kwargs) + return mark_boundaries(*args, **kwargs)