ENH: density thresholding filter