mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-13 12:40:24 +08:00
Add plugin names
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user