Methods for Tree-based Local Adaptive Thresholding