The used thresholding Method: Mean, Median, Sauvola, MidGrey, Bernsen, Niblack. Mean, Niblack and Sauvola are implemented using the fast integral image approach.
This is an example that find all the image.bin.gz files from channel 01 under a directory and makes an image stack of all the slices numbered 23. It needs to be customized to be useful to you.