added window_leveling property to Grayscalelayer; thresholdingcontroler now adjusts the threshold automatically when the channel is changed, identification of layer based on window_leveling flag