Add plugin names

This commit is contained in:
Tony S Yu
2012-07-21 19:48:26 -05:00
parent c21fe1c2f9
commit 221cf733d1
3 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -46,6 +46,7 @@ class Plugin(QtGui.QDialog):
overlay : array
Image used in measurement/manipulation.
"""
name = 'Plugin'
draws_on_image = False
def __init__(self, image_viewer, callback=None, height=100, width=400,
@@ -54,7 +55,7 @@ class Plugin(QtGui.QDialog):
QtGui.QDialog.__init__(self, image_viewer)
self.image_viewer.plugins.append(self)
self.setWindowTitle('Image Plugin')
self.setWindowTitle(self.name)
self.layout = QtGui.QGridLayout(self)
self.resize(width, height)
self.row = 0
@@ -67,7 +68,6 @@ class Plugin(QtGui.QDialog):
self.overlay = self.image_viewer.overlay
self.image = self.image_viewer.image
if useblit is None:
useblit = True if mpl.backends.backend.endswith('Agg') else False
self.useblit = useblit
+2
View File
@@ -4,6 +4,8 @@ from skimage.filter import canny
class CannyPlugin(Plugin):
name = 'Canny Filter'
def __init__(self, image_viewer, *args, **kwargs):
height = kwargs.get('height', 100)
width = kwargs.get('width', 400)
+1
View File
@@ -30,6 +30,7 @@ class LineProfile(PlotPlugin):
'image' : fixed scale based on min/max intensity in image.
'dtype' : fixed scale based on min/max intensity of image dtype.
"""
name = 'Line Profile'
draws_on_image = True
def __init__(self, image_viewer, useblit=None,