Elastic and Inelastic Scattering in Electron Diffraction and Imaging