title: Using scipy.weave.inline for fast 2D median filtering
body: <p>I have a bottleneck in a 2D median filter (3x3 window) I use on a very large set of images, and I'd like to try and optimize it.  I've tested <code>scipy.ndimage</code> median_filter, as well as <code>PIL</code>, <code>scipy.signal</code> and <code>scikits-image</code>. However, browsing in SO I've learned that there's a fast O(n) median filter out there in C (Median Filtering in Constant Time see <a href="https://stackoverflow.com/questions/1309263/rolling-median-algorithm-in-c">Rolling median algorithm in C</a>), and I wondered whether I can implement it in Python using scipy.weave.inline ?
  Any suggestions on an alternative route?</p>