Preprocessing algorithms for the digital histology of colorectal cancer