We present a method and an equipment for performing μm-resolved X-ray diffraction area maps, and apply it to wafer defect analysis and industrial wafer quality inspection. The method determines simultaneously the macroscopic warpage, the mesoscopic curvature and the microscopic defect structure of semiconductor wagers. It is based on X-ray diffraction rocking curve imaging of the whole wafer with down to 1 μm 2 resolution. The new wafer testing equipment determines the maximal and integral peak intensities, the peak position and the half width of the rocking curves with a microscopic resolution, thus imaging simultaneously the macroscopic quality parameters and the microscopic defect structure. This permits to establish a direct one-to-one correlation between the microscopic defects and the resulting macroscopic effects. As an example, wafers of different materials, fabrication technology and resulting perfection are studied. When investigating layered samples, the technique allows furthermore to determine the influence of the wafer quality on the layer properties. The method can be applied generally to characterize non-destructively the quality of all kinds of crystalline structures, like, e.g. microelectronic and optoelectronic devices.