mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-07 11:28:14 +08:00
Change ImageViewer to automatically call plugins.
This commit is contained in:
@@ -104,6 +104,8 @@ class ImageViewer(QtGui.QMainWindow):
|
||||
self.close()
|
||||
|
||||
def show(self):
|
||||
for p in self.plugins:
|
||||
p.show()
|
||||
super(ImageViewer, self).show()
|
||||
sys.exit(qApp.exec_())
|
||||
|
||||
|
||||
@@ -5,6 +5,5 @@ from skimage.viewer.plugins.canny import CannyPlugin
|
||||
|
||||
image = data.camera()
|
||||
viewer = ImageViewer(image)
|
||||
p = CannyPlugin(viewer)
|
||||
p.show()
|
||||
CannyPlugin(viewer)
|
||||
viewer.show()
|
||||
|
||||
@@ -5,6 +5,5 @@ from skimage.viewer.plugins.lineprofile import LineProfile
|
||||
|
||||
image = data.camera()
|
||||
viewer = ImageViewer(image)
|
||||
p = LineProfile(viewer)
|
||||
p.show()
|
||||
LineProfile(viewer)
|
||||
viewer.show()
|
||||
|
||||
Reference in New Issue
Block a user