mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 07:37:56 +08:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user