We derive a method for extended depth-of-focus imaging, i.e., a method to render a 2-D image of a thick specimen, such that all the structures within the specimen appear in focus and with greatly increased contrast. We acquire a single image while moving the specimen through focus. The resulting image, which is severely blurred and has very low contrast, is then deconvolved. In the deconvolved image, the entire depth of the specimen is in focus. Because the image is collected continuously while the specimen moves through focus, the acquisition time is short. Likewise, because the deconvolution is done in 2-D, it is done very quickly even with an iterative algorithm.