mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-10 12:35:06 +08:00
Merge branch 'imagecollection'
This commit is contained in:
@@ -12,6 +12,7 @@ from glob import glob
|
||||
plugin_store = {'imread': [],
|
||||
'imsave': [],
|
||||
'imshow': [],
|
||||
'imread_collection': [],
|
||||
'_app_show': []}
|
||||
|
||||
plugin_provides = {}
|
||||
@@ -54,7 +55,7 @@ def call(kind, *args, **kwargs):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
kind : {'show', 'save', 'read'}
|
||||
kind : {'imshow', 'imsave', 'imread', 'imread_collection'}
|
||||
Function to look up.
|
||||
plugin : str, optional
|
||||
Plugin to load. Defaults to None, in which case the first
|
||||
@@ -94,7 +95,7 @@ def use(name, kind=None):
|
||||
----------
|
||||
name : str
|
||||
Name of plugin.
|
||||
kind : {'save', 'read', 'show'}, optional
|
||||
kind : {'imsave', 'imread', 'imshow', 'imread_collection'}, optional
|
||||
Set the plugin for this function. By default,
|
||||
the plugin is set for all functions.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
[test]
|
||||
description = Test plugin
|
||||
provides = imsave, imshow, imread
|
||||
|
||||
provides = imsave, imshow, imread, imread_collection
|
||||
|
||||
@@ -9,3 +9,7 @@ def imsave(fname, arr):
|
||||
def imshow(arr, plugin_arg=None):
|
||||
assert arr == [1, 2, 3]
|
||||
assert plugin_arg == (1, 2)
|
||||
|
||||
def imread_collection(x, conserve_memory=True):
|
||||
assert conserve_memory == False
|
||||
assert x == '*.png'
|
||||
|
||||
Reference in New Issue
Block a user