API Change: Attach ImageViewer to Plugin after init.

Plugin is now added to the viewer using an inplace add on the viewer instead of on initialization of the plugin. This change means that operations requiring the viewer must be delayed until attach operation.
This commit is contained in:
Tony S Yu
2012-07-23 00:12:21 -04:00
parent 9d1df0c3ce
commit f47312a3d1
8 changed files with 61 additions and 44 deletions
+1 -1
View File
@@ -5,5 +5,5 @@ from skimage.viewer.plugins.canny import CannyPlugin
image = data.camera()
viewer = ImageViewer(image)
CannyPlugin(viewer)
viewer += CannyPlugin()
viewer.show()
+1 -1
View File
@@ -5,5 +5,5 @@ from skimage.viewer.plugins.lineprofile import LineProfile
image = data.camera()
viewer = ImageViewer(image)
LineProfile(viewer)
viewer += LineProfile()
viewer.show()