mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-13 12:40:24 +08:00
Describe plugins using .ini files, so that we don't need to import them to know their capabilities.
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import plugin
|
||||
def imread(fname, as_grey=False, dtype=None):
|
||||
assert fname == 'test.png'
|
||||
assert as_grey == True
|
||||
assert dtype == 'i4'
|
||||
|
||||
def save(fname, arr):
|
||||
return fname, arr
|
||||
def imsave(fname, arr):
|
||||
assert fname == 'test.png'
|
||||
assert arr == [1, 2, 3]
|
||||
|
||||
plugin.register('test', save=save)
|
||||
def imshow(arr, plugin_arg=None):
|
||||
assert arr == [1, 2, 3]
|
||||
assert plugin_arg == (1, 2)
|
||||
|
||||
Reference in New Issue
Block a user