x : input image r : the radius of the median filter (r = 4 corresponds to a 9x9 window)
function y = immedfilt(x : cube, r : int)