The basic working principle of diffraction topography is as follows:
An incident, spatially extended beam (mostly of X-rays, or neutrons) impinges on a sample.
The beam may be either monochromatic, i.e. consist one single wavelength of X-rays or neutrons, or polychromatic, i.e. be composed of a mixture of wavelengths  ("white beam" topography). Furthermore, the incident beam may be either parallel, consisting only of "rays" propagating all along nearly the same direction, or divergent/convergent, containing several more strongly different directions of propagation.
When the beam hits the crystalline sample, Bragg diffraction occurs, i.e. the incident wave is reflected by the atoms on certain lattice planes of the sample, if it hits those planes at the right Bragg angle.
Diffraction from sample can take place either in reflection geometry (Bragg case), with the beam entering and leaving through the same surface, or in transmission geometry (Laue case).
Diffraction gives rise to a diffracted beam, which will leave the sample and propagate along a direction differing from the incident direction by the scattering angle .
The cross section of the diffracted beam may or may not be identical to the one of the incident beam. In the case of strongly asymmetric reflections, the beam size (in the diffraction plane) is considerably expanded or compressed, with expansion occurring if the incidence angle is much smaller than the exit angle, and vice versa. Independently of this beam expansion, the relation of sample size to image size is given by the exit angle alone: The apparent lateral size of sample features parallel to the exit surface is downscaled in the image by the projection effect of the exit angle.
A homogeneous sample (with a regular crystal lattice) would yield a homogeneous intensity distribution in the topograph (a "flat" image with no contrast). Intensity modulations (topographic contrast) arise from irregularities in the crystal lattice, originating from various kinds of defects such as
* voids and inclusions in the crystal
* phase boundaries (regions of different crystallographic phase, polytype, ...)
* defective areas, non-crystalline (amorphous) areas / inclusions
* cracks, surface scratches
* stacking faults
* dislocations, dislocation bundles
* grain boundaries, domain walls
* growth striations
* point defects or defect clusters
* crystal deformation
* strain fields
In many cases of defects such as dislocations, topography is not directly sensitive to the defects themselves (atomic structure of the dislocation core), but predominantly to the strain field surrounding the defect region.