diff --git a/skimage/rank/tests/test_16bitbilateral.py b/skimage/rank/tests/demo_16bitbilateral.py similarity index 100% rename from skimage/rank/tests/test_16bitbilateral.py rename to skimage/rank/tests/demo_16bitbilateral.py diff --git a/skimage/rank/tests/demo_all.py b/skimage/rank/tests/demo_all.py new file mode 100644 index 00000000..8001a25f --- /dev/null +++ b/skimage/rank/tests/demo_all.py @@ -0,0 +1,24 @@ +import numpy as np +import matplotlib.pyplot as plt + +from skimage import data +from skimage.rank import crank8_percentiles +from skimage.rank import crank16_bilateral + +if __name__ == '__main__': + a8 = (data.coins()).astype('uint8') + + a16 = (data.coins()).astype('uint16')*16 + selem = np.ones((20,20),dtype='uint8') + f1 = crank8_percentiles.mean(a8,selem = selem,p0=.1,p1=.9) + f2 = crank16_bilateral.mean(a16,selem = selem,bitdepth=12,s0=500,s1=500) + + plt.figure() + plt.imshow(np.hstack((a8,f1))) + plt.colorbar() + + plt.figure() + plt.imshow(np.hstack((a16,f2))) + plt.colorbar() + + plt.show() diff --git a/skimage/rank/tests/test_benchmark.py b/skimage/rank/tests/demo_benchmark.py similarity index 100% rename from skimage/rank/tests/test_benchmark.py rename to skimage/rank/tests/demo_benchmark.py