From e176b9d551629499c10e2fde550da056ada5cba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sun, 16 Feb 2014 12:48:40 -0500 Subject: [PATCH 1/2] DOC: viewer: some corrections --- doc/source/user_guide/viewer.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/source/user_guide/viewer.txt b/doc/source/user_guide/viewer.txt index 82bb5949..da7f0c50 100644 --- a/doc/source/user_guide/viewer.txt +++ b/doc/source/user_guide/viewer.txt @@ -24,26 +24,26 @@ alternatively, ``skimage.io.imshow`` which adds support for multiple io-plugins) to display images. The advantage of ``ImageViewer`` is that you can easily add plugins for manipulating images. Currently, only a few plugins are implemented, but it is easy to write your own. Before going into the details, -let's see an example of how a plugin is added to the viewer: +let's see an example of how a pre-defined plugin is added to the viewer: .. code-block:: python - from skimage.viewer.plugins import Canny + from skimage.viewer.plugins.lineprofile import LineProfile viewer = ImageViewer(image) - viewer += Canny(view) + viewer += LineProfile(viewer) viewer.show() -At the moment, there aren't very many plugins pre-defined, but there's a really -simple interface for creating your own plugin. First, let's create a plugin to -call the total-variation denoising function, ``tv_denoise``: +At the moment, there are not many plugins pre-defined, but there is a really +simple interface for creating your own plugin. First, let us create a plugin to +call the total-variation denoising function, ``denoise_tv_bregman``: .. code-block:: python - from skimage.filter import tv_denoise + from skimage.filter import denoise_tv_bregman from skimage.viewer.plugins.base import Plugin - denoise_plugin = Plugin(image_filter=tv_denoise) + denoise_plugin = Plugin(image_filter=denoise_tv_bregman) .. note:: From 4f5105983c60994aa5c3fe1677231afbaf5b9145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sun, 16 Feb 2014 13:15:54 -0500 Subject: [PATCH 2/2] MAINT: populate __init__.py --- skimage/viewer/plugins/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/skimage/viewer/plugins/__init__.py b/skimage/viewer/plugins/__init__.py index e69de29b..7bb07333 100644 --- a/skimage/viewer/plugins/__init__.py +++ b/skimage/viewer/plugins/__init__.py @@ -0,0 +1,9 @@ +from .base import Plugin +from .canny import CannyPlugin +from .color_histogram import ColorHistogram +from .crop import Crop +from .labelplugin import LabelPainter +from .lineprofile import LineProfile +from .measure import Measure +from .overlayplugin import OverlayPlugin +from .plotplugin import PlotPlugin