Adapt interface of pixel_threshold