Wavefront coding technology can extend the depth of focus of a well-corrected three-mirror anastigmatic optical system by about ten times, but the image obtained directly by charge-coupled devices blurs at the same time. An effective image restoration must be applied to these blurred images. This paper describes an innovative method that restores the blurred image, which combines the optical design software and mathematical software. The point spread function of system with wavefront coding technology is quite different from the usual and difficult to simulate by a disk function or other simple function in most cases. The commercial optical design software is applied to obtain the point spread function. If a 1×1-pixel image with brightness 255 is set as the point source of a optical system, the result of calculation software using a ray tracing algorithm will itself be the digital point spread function. This is proven to be a simple and effective way to acquire the complicated point spread functions of unusual optical systems such as those using wavefront coding technology. A regularization factor and contrast-adjusting factors are introduced into the classical Wiener filter, which achieves good restored images: the root-mean-square error is less than 0.0193, while the peak signal-noise ratio is higher than 23.7. Some parameters of the filter can be adjusted so that the restored image is more suitable for evaluation by eye. It is also shown that a single filter can restore all the images within the extended depth of focus.