mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-10 12:35:06 +08:00
ENH: Default to blitting
Since the Qt4 Agg backend is always used, it's always safe to use blitting.
This commit is contained in:
@@ -9,11 +9,6 @@ except ImportError:
|
||||
QDialog = object # hack to prevent nosetest and autodoc errors
|
||||
print("Could not import PyQt4 -- skimage.viewer not available.")
|
||||
|
||||
try:
|
||||
import matplotlib as mpl
|
||||
except ImportError:
|
||||
print("Could not import matplotlib -- skimage.viewer not available.")
|
||||
|
||||
from ..utils import RequiredAttr, init_qtapp
|
||||
|
||||
|
||||
@@ -81,7 +76,7 @@ class Plugin(QDialog):
|
||||
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=None):
|
||||
def __init__(self, image_filter=None, height=0, width=400, useblit=True):
|
||||
init_qtapp()
|
||||
super(Plugin, self).__init__()
|
||||
|
||||
@@ -98,8 +93,6 @@ class Plugin(QDialog):
|
||||
self.arguments = []
|
||||
self.keyword_arguments= {}
|
||||
|
||||
if useblit is None:
|
||||
useblit = True if mpl.backends.backend.endswith('Agg') else False
|
||||
self.useblit = useblit
|
||||
self.cids = []
|
||||
self.artists = []
|
||||
|
||||
@@ -103,7 +103,6 @@ class LineProfile(PlotPlugin):
|
||||
|
||||
def line_changed(self, end_pts):
|
||||
x, y = np.transpose(end_pts)
|
||||
|
||||
self.end_pts = end_pts
|
||||
scan = profile_line(self.image_viewer.original_image, end_pts,
|
||||
linewidth=self.line_tool.linewidth)
|
||||
|
||||
Reference in New Issue
Block a user