1. A system, comprising: a support apparatus configured to support samples; a radiation source configured to illuminate samples; an imaging apparatus configured to obtain images of samples; and an electronic processor connected to the imaging apparatus and configured to: receive an image of a first sample on the support apparatus, the first sample comprising a first stain and a second stain, wherein the first stain selectively binds to only a first subset of regions of the first sample; analyze the image of the first sample to obtain a first component image corresponding substantially only to spectral contributions from the first stain, and a second component image corresponding substantially only to spectral contributions from the second stain; and train a classifier to identify a second subset of regions in a second sample that corresponds to the first subset of regions in the first sample, wherein the second sample does not comprise the first stain.