Methods are disclosed for classifying different parts of a sample into respective classes based on an image stack that includes one or more images.