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
+3 -2
View File
@@ -40,8 +40,9 @@ class PlotPlugin(Plugin):
image : array
Image used in measurement/manipulation.
"""
def __init__(self, image_viewer, **kwargs):
Plugin.__init__(self, image_viewer, **kwargs)
def attach(self, image_viewer):
super(PlotPlugin, self).attach(image_viewer)
# Add plot for displaying intensity profile.
self.add_plot()