A method for analyzing biological specimens by spectral imaging to provide a medical diagnosis includes obtaining spectral and visual images of biological specimens and registering the images to detect cell abnormalities, pre-cancerous cells, and cancerous cells. This method eliminates the bias and unreliability of diagnoses that is inherent in standard histopathological and other spectral methods. In addition, a method for correcting confounding spectral contributions that are frequently observed in microscopically acquired infrared spectra of cells and tissue includes performing a phase correction on the spectral data. This phase correction method may be used to correct various types of absorption spectra that are contaminated by reflective components.