title: How to do a median projection of a large image stack in Matlab
body: <p>I have a large stack of 800 16bit gray scale images with 2048x2048px. They are read from a single BigTIFF file and the whole stack barely fits into my RAM (8GB).
  Now I need do a median projection. That means I want to compute the median of each pixel across all 800 frames. The Matlab median function fails because there is not enough memory left make a copy of the whole array for the function call. What would be an efficient way to compute the median?</p>
  
  <p>I have tried using a <code>for</code> loop to compute the median one pixel at a time, but this is still terribly slow.</p>