For wavefront sensing, wavefront shaping, and optical filtering, spatial light modulators can be very useful. With the availability of high resolution liquid crystals (LC) spatial phase modulators and micromechanical systems (MEMS) containing large arrays of micromirrors, new applications in optical metrology become possible. For wavefront analysis and correction, dynamic CGHs are used. A correction hologram for the aberrated system is computed from which the lens shape can be derived. For Hartmann sensors, usually static microlenses are used. It was found advantageous to generate dynamic microlenses in order to correct for local wavefront aberrations. Optically addressed spatial light modulators can be applied very effectively for the characterisation and defect analysis of primarily periodic structures such as microchips or microlens arrays. For triangulation based methods, better results can be obtained by adapting the projected fringes to the object in terms of shape and brightness. Examples and experimental results are discussed.© (2001) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.