I found this application very useful as for macrophotography.
All below info is gotten from the program site: http://d-studio.com.ua/products/helicon_focus/helicon_focus.html
Helicon Focus is a program that creates one completely focused image
from several partially focused images by combining the focused areas.
The program is designed for macrophotography, microphotography and hyperfocal landscape photography to cope with the shallow depth-of-field problem.
Helicon Focus also aligns images as objects often change their size and position from shot to shot. This function is especially important for macrophotography. [...]
Volodymyr Prokurashko mentioned Helicon Focus.
I recently bought Helicon Focus and find that it's an easy-to-use
application that really works to combine a number of photos into a
single image with a huge apparent depth of field.
The latest version of Photoshop, CS4, now has the ability to merge multiple images with different parts in focus.
Last summer, I used Helicon Focus for its 30-day trial period and decided not to buy it. It does a reasonably good job at what it claims to do. Unfortunately, at that time the Mac version was a simplified version of the PC version. Maybe now the two versions are more comparable. If so, there may be more reason to buy it.
Mac version of Helicon Focus still does not have the same list of features
as its Windows analogue. However, I found that for big stacks, it produces
results with greater performance than CS4 does. And I did not find
difference in quality.