Compute the median projection of an image stack.