A method to seamlessly combine the multiple images with varying planes of focus into a single, in-focus image.
Let me preface this with a disclaimer. I have no idea how to accomplish this in anything other than Photoshop (CS4 and later.) Not Photoshop Elements, not Preview or any other piece of software.
I’m quite sure that there are other software packages that can do this. Or not.
I’ve used Photoshop almost exclusively since

Here are the images. I started with the focus on the front.

Then, progressively moved focus to the rear.




Note this convention: > means next menu level down
First, File>Scripts>Load Files into Stack (so, open the File Menu, then select Scripts, then select Load Files into Stack. This will take the selected files and put them into separate layers in the same file.

Once the images have ben loaded into layers, select all of them.

Then Edit>Auto-Align Layers

This will align the images if you kicked the tripod.
Next Edit>Auto-Blend Layers and MAGIC!

The image processing algorithm compares edge diffusion and contrast (the sharper parts of the image have less diffusion and greater contrast), then, creates alpha channel masks to only show the sharp segments. The mask edges are then tweaked to seamlessly blend the images. There is a lot of math going on here.
The entire processing time was 7.4 seconds. (MacBook Pro, 3.1 gHz, 16GB RAM)



