diff --git a/skimage/viewer/plugins/base.py b/skimage/viewer/plugins/base.py index 50b7601c..1da020d0 100644 --- a/skimage/viewer/plugins/base.py +++ b/skimage/viewer/plugins/base.py @@ -235,3 +235,20 @@ class Plugin(QtGui.QDialog): """Remove artists that are connected to the image viewer.""" for a in self.artists: a.remove() + + def output(self): + """Return the plugin's representation and data. + + Parameters + ---------- + None + + Returns + ------- + overlay : array, same shape as ``self.image_viewer.image``, or None + The filtered image. + data : array, arbitrary shape and type, or None + Any data associated with the plugin. + """ + return (self.image_viewer.image, None) + diff --git a/skimage/viewer/viewers/core.py b/skimage/viewer/viewers/core.py index 8b5eb7ba..27cf7c4e 100644 --- a/skimage/viewer/viewers/core.py +++ b/skimage/viewer/viewers/core.py @@ -228,6 +228,7 @@ class ImageViewer(QtGui.QMainWindow): self._show() if main_window: utils.start_qtapp() + return [p.output() for p in self.plugins] def redraw(self): self.canvas.draw_idle()