Merge branch 'imagecollection'

This commit is contained in:
Stefan van der Walt
2010-11-07 00:51:21 +02:00
5 changed files with 43 additions and 5 deletions
+3 -2
View File
@@ -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 -2
View File
@@ -1,4 +1,3 @@
[test]
description = Test plugin
provides = imsave, imshow, imread
provides = imsave, imshow, imread, imread_collection
+4
View File
@@ -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'