Thick specimens in the CEM and STEM. I. Contrast