A) What You do in Zerene stacker
(Note! you will need the Prosumer Edition or Professional Edition.)
1) The choice of subject is important. A perfect subject for this technique does not have any hidden surfaces when viewed trough the camera for example a sphere. For this example I used a coin.
2) Later on You need to use the dimensions of your subject to scale the depth map in Adobe photoshop. In this case I used Nikon BD plan apo 40x lens with a 2.5 x projection lens on a 24X36mm sensor. This means 40 x 2.5 = 100x on sensor or a field of view of 0.24 X 0.36 mm on sensor. The difference between the highest and the lowest part of the subject is 0.05 mm.
3) Photograph the subject. I took 104 pictures the step size was 0.0005 mm.

This photo is stacked with “Stack New Images (Pmax) ” so I could watch the stacking procedure “live”. It looks OK so I use this as the picture I am going to use in Adobe PS
4) In preferences select “Save depth map in directory” and choose a directory.
5) Do a Dmap stack to create a Depth Map. I used 0 (!) contrast threshold.

Note that the white areas are the deepest and the black areas are the closest, later we will invert this because Adobe PS handles black as the deepest and white as the closest.