mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 00:23:43 +08:00
ENH: Allow imshow to show images when given file name.
This commit is contained in:
+4
-2
@@ -138,8 +138,8 @@ def imshow(arr, plugin=None, **plugin_args):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arr : ndarray
|
||||
Image data.
|
||||
arr : ndarray or str
|
||||
Image data or name of image file.
|
||||
plugin : str
|
||||
Name of plugin to use. By default, the different plugins are
|
||||
tried (starting with the Python Imaging Library) until a suitable
|
||||
@@ -151,6 +151,8 @@ def imshow(arr, plugin=None, **plugin_args):
|
||||
Passed to the given plugin.
|
||||
|
||||
"""
|
||||
if isinstance(arr, basestring):
|
||||
arr = call_plugin('imread', arr, plugin=plugin)
|
||||
return call_plugin('imshow', arr, plugin=plugin, **plugin_args)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user