Quantitative segmentation of fluorescence microscopy images of heterogeneous tissue: application to the detection of residual disease in tumor margins