From 16a720770a6e81c388fc1b18b471d8155738d7ea Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Wed, 12 Dec 2012 13:34:53 -0500 Subject: [PATCH] STY: Clean up unused blitting-related code --- skimage/viewer/plugins/base.py | 12 ------------ skimage/viewer/plugins/lineprofile.py | 1 - 2 files changed, 13 deletions(-) diff --git a/skimage/viewer/plugins/base.py b/skimage/viewer/plugins/base.py index cc6352dc..c5dd2770 100644 --- a/skimage/viewer/plugins/base.py +++ b/skimage/viewer/plugins/base.py @@ -74,7 +74,6 @@ class Plugin(QDialog): """ name = 'Plugin' image_viewer = RequiredAttr("%s is not attached to ImageViewer" % name) - draws_on_image = False def __init__(self, image_filter=None, height=0, width=400, useblit=True): init_qtapp() @@ -116,8 +115,6 @@ class Plugin(QDialog): #TODO: Always passing image as first argument may be bad assumption. self.arguments.append(self.image_viewer.original_image) - if self.draws_on_image: - self.connect_image_event('draw_event', self.on_draw) # Call filter so that filtered image matches widget values self.filter_image() @@ -148,15 +145,6 @@ class Plugin(QDialog): self.add_widget(widget) return self - def on_draw(self, event): - """Save image background when blitting. - - The saved image is used to "clear" the figure before redrawing artists. - """ - if self.useblit: - bbox = self.image_viewer.ax.bbox - self.img_background = self.image_viewer.canvas.copy_from_bbox(bbox) - def filter_image(self, *widget_arg): """Call `image_filter` with widget args and kwargs diff --git a/skimage/viewer/plugins/lineprofile.py b/skimage/viewer/plugins/lineprofile.py index 1f9e046e..9d394e5f 100644 --- a/skimage/viewer/plugins/lineprofile.py +++ b/skimage/viewer/plugins/lineprofile.py @@ -33,7 +33,6 @@ class LineProfile(PlotPlugin): 'dtype' : fixed scale based on min/max intensity of image dtype. """ name = 'Line Profile' - draws_on_image = True def __init__(self, linewidth=1, maxdist=5, epsilon='deprecated', limits='image', **kwargs):