1. A method of focusing, comprising: acquiring, with an imaging device, a first electronic image of at least a portion of a slide presenting a medical sample; varying a focus of said slide by changing a distance between said slide and the imaging device to acquire a second electronic image; based on the acquiring and varying, fitting at least one characteristic of the first and second images to a Gaussian function; using said fitting to select an optimum focus by positioning the slide at a specified distance from the imaging device relative to a peak of said Gaussian function as an estimate of a coarse focus position; determining a fine focus position by finding a least squares fit to a second order polynomial; and positioning the imaging device at the fine focus position.