From 27d028e2e99d32fa603a677c581e2a896e83a51a Mon Sep 17 00:00:00 2001 From: Olivier Debeir Date: Thu, 4 Oct 2012 18:03:08 +0200 Subject: [PATCH] add demo all (cont.) --- skimage/rank/tests/demo_all.py | 120 ++++++++++++++++----------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/skimage/rank/tests/demo_all.py b/skimage/rank/tests/demo_all.py index d005d61a..8e09048e 100644 --- a/skimage/rank/tests/demo_all.py +++ b/skimage/rank/tests/demo_all.py @@ -12,69 +12,69 @@ if __name__ == '__main__': # selem = np.ones((30,30),dtype='uint8') selem = disk(5) -# for n in dir(crank16): -# method = eval('crank16.%s'%n) -# t = type(method) -# if t == type(crank8.maximum): -# print n,t -# f = method(a16,selem = selem,bitdepth=12) -# -# plt.figure() -# plt.subplot(1,2,1) -# plt.imshow(a16) -# plt.colorbar() -# plt.subplot(1,2,2) -# plt.imshow(f) -# plt.colorbar() -# plt.title(method) + for n in dir(crank16): + method = eval('crank16.%s'%n) + t = type(method) + if t == type(crank8.maximum): + print n,t + f = method(a16,selem = selem,bitdepth=12) -# for n in dir(crank8): -# method = eval('crank8.%s'%n) -# t = type(method) -# if t == type(crank8.maximum): -# print n,t -# f = method(a8,selem = selem) -# -# plt.figure() -# plt.subplot(1,2,1) -# plt.imshow(a8) -# plt.colorbar() -# plt.subplot(1,2,2) -# plt.imshow(f) -# plt.colorbar() -# plt.title(method) + plt.figure() + plt.subplot(1,2,1) + plt.imshow(a16) + plt.colorbar() + plt.subplot(1,2,2) + plt.imshow(f) + plt.colorbar() + plt.title(method) -# for n in dir(crank8_percentiles): -# method = eval('crank8_percentiles.%s'%n) -# t = type(method) -# if t == type(crank8.maximum): -# print n,t -# f = method(a8,selem = selem,p0=.1,p1=.9) -# -# plt.figure() -# plt.subplot(1,2,1) -# plt.imshow(a8) -# plt.colorbar() -# plt.subplot(1,2,2) -# plt.imshow(f) -# plt.colorbar() -# plt.title(method) + for n in dir(crank8): + method = eval('crank8.%s'%n) + t = type(method) + if t == type(crank8.maximum): + print n,t + f = method(a8,selem = selem) -# for n in dir(crank16_percentiles): -# method = eval('crank16_percentiles.%s'%n) -# t = type(method) -# if t == type(crank8.maximum): -# print n,t -# f = method(a16,selem = selem,bitdepth=12,p0=.1,p1=.9) -# -# plt.figure() -# plt.subplot(1,2,1) -# plt.imshow(a16) -# plt.colorbar() -# plt.subplot(1,2,2) -# plt.imshow(f) -# plt.colorbar() -# plt.title(method) + plt.figure() + plt.subplot(1,2,1) + plt.imshow(a8) + plt.colorbar() + plt.subplot(1,2,2) + plt.imshow(f) + plt.colorbar() + plt.title(method) + + for n in dir(crank8_percentiles): + method = eval('crank8_percentiles.%s'%n) + t = type(method) + if t == type(crank8.maximum): + print n,t + f = method(a8,selem = selem,p0=.1,p1=.9) + + plt.figure() + plt.subplot(1,2,1) + plt.imshow(a8) + plt.colorbar() + plt.subplot(1,2,2) + plt.imshow(f) + plt.colorbar() + plt.title(method) + + for n in dir(crank16_percentiles): + method = eval('crank16_percentiles.%s'%n) + t = type(method) + if t == type(crank8.maximum): + print n,t + f = method(a16,selem = selem,bitdepth=12,p0=.1,p1=.9) + + plt.figure() + plt.subplot(1,2,1) + plt.imshow(a16) + plt.colorbar() + plt.subplot(1,2,2) + plt.imshow(f) + plt.colorbar() + plt.title(method) selem = disk(50) for n in dir(crank16_bilateral):