From 4e05ebf7112ed56caf68cdccc0206048cb8e1e7c Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Fri, 1 Nov 2013 15:10:30 +1100 Subject: [PATCH] Incorporate @tonysyu's suggestions re:docstrings --- skimage/viewer/plugins/base.py | 17 ++++++++++------- skimage/viewer/plugins/overlayplugin.py | 4 ---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/skimage/viewer/plugins/base.py b/skimage/viewer/plugins/base.py index 1da020d0..1a2eedd9 100644 --- a/skimage/viewer/plugins/base.py +++ b/skimage/viewer/plugins/base.py @@ -238,17 +238,20 @@ class Plugin(QtGui.QDialog): def output(self): """Return the plugin's representation and data. - - Parameters - ---------- - None - + Returns ------- - overlay : array, same shape as ``self.image_viewer.image``, or None + image : array, same shape as ``self.image_viewer.image``, or None The filtered image. - data : array, arbitrary shape and type, or None + data : None Any data associated with the plugin. + + Notes + ----- + Derived classes should override this method to return a tuple + containing an *overlay* of the same shape of the image, and a + *data* object. Either of these is optional: return ``None`` if + you don't want to return a value. """ return (self.image_viewer.image, None) diff --git a/skimage/viewer/plugins/overlayplugin.py b/skimage/viewer/plugins/overlayplugin.py index 049f81a5..e154281c 100644 --- a/skimage/viewer/plugins/overlayplugin.py +++ b/skimage/viewer/plugins/overlayplugin.py @@ -111,10 +111,6 @@ class OverlayPlugin(Plugin): def output(self): """Return the overlaid image. - Parameters - ---------- - None - Returns ------- overlay : array, same shape as image