from skimage import data
from skimage.filter import median_filter

from skimage.viewer import ImageViewer
from skimage.viewer.widgets import Slider, OKCancelButtons, SaveButtons
from skimage.viewer.plugins.base import Plugin


image = data.coins()
viewer = ImageViewer(image)

plugin = Plugin(image_filter=median_filter)
plugin += Slider('radius', 2, 10, value_type='int')
plugin += SaveButtons()
plugin += OKCancelButtons()

viewer += plugin
viewer.show()

@@ -37,16 +37,21 @@
 e.filter
+.rank
  import 
@@ -56,23 +56,52 @@
 t median
-_filter
+%0Afrom skimage.morphology import disk
 %0A%0Afrom s
@@ -253,16 +253,95 @@
 Plugin%0A%0A
+def median_filter(image, radius):%0A    return median(image, selem=disk(radius))%0A
 %0Aimage =

Fix median filter example