Because a 4D-STEM dataset contains the entire diffraction pattern at every probe position, any STEM detector geometry can be applied after the experiment: integrate the intensity inside a chosen region of the diffraction pattern at each probe position, and the result is an image. This is virtual imaging, and it is usually the first, and often the most informative, analysis applied to any 4D-STEM dataset. Virtual bright field and dark field reconstruction in this sense was popularized by Rauch and co-workers alongside scanning precession diffraction and ACOM VILADOT et al. (2013), Rauch & Véron (2014), and generalized to arbitrarily shaped virtual apertures by Gammer et al. Gammer et al. (2015).
Virtual bright field and dark field¶
A circular mask over the central beam gives a virtual bright field (BF) image; an annulus outside it gives a virtual annular dark field (ADF). The two are complementary: electrons scattered out of the BF disk land in the DF detector, so regions that darken in BF brighten in DF. Unlike physical detectors, virtual detectors are free: you can try any inner/outer radius, any shape, any position, and iterate until the contrast isolates the feature you care about Paterson et al. (2020):

Virtual detectors are defined in software after the experiment: a single aperture over one reflection, an annulus, or an aperture array matched to a whole family of diffracted spots.
Detector design matters. The BF detector should capture the unscattered disk (slightly expanded to tolerate residual descan); the ADF annulus geometry controls whether contrast is dominated by diffraction (low angles) or thickness/Z (high angles).
Selected-area diffraction in reverse: integrating diffraction patterns over a real-space region of interest gives a virtual selected-area pattern from exactly that region, ideal for identifying which reflections belong to which microstructural feature.
Digital dark field¶
Classical dark field TEM tilts the beam (or shifts the objective aperture) so one chosen Bragg reflection forms the image:

Conventional dark field TEM: an objective aperture in the back focal plane selects a single diffracted beam to form the image: one reflection, one exposure, one tilt condition at a time.
The 4D-STEM equivalent, digital dark field (DDF) MacLaren et al. (2024), places a virtual aperture over one (or several) specific Bragg reflections and maps where in real space that reflection is excited. Every reflection in the dataset is available simultaneously, from a single scan:

The DDF workflow: after peak finding and g-vector identification, images can be formed from a single virtual aperture, from a mask built on a whole array of aperture positions, or by reducing the detected points list directly against the aperture array.
This is enormously powerful for microstructure:
Grain and domain mapping: each grain lights up only in the reflections it produces, so DDF images segment grains, twins, and ferroelastic/ferroelectric domains, even when they are invisible in BF/ADF contrast MacLaren et al. (2020).
Superlattice and ordered phases: placing the aperture on superlattice reflections maps ordered regions and antiphase domains directly:

Digital dark field in action on a perovskite thin film: virtual apertures on different superlattice and higher-order Laue zone reflections (right) map chemically and structurally distinct ordered regions through the film (left), all from one 4D-STEM scan.
Tracking spots, not just masking them: in real datasets the reflections move (strain, rotation, descan), so robust DDF implementations follow the peak within a window rather than using a fixed mask; this is where Bragg-vector-based approaches and fast implementations (Kelvin_STEM, py4DSTEM, pyxem) come in.
From the ensemble of DDF images, phase and domain maps of the whole field of view can be assembled, the manual counterpart of the ML clustering approaches in the next module.
- VILADOT, D., VÉRON, M., GEMMI, M., PEIRÓ, F., PORTILLO, J., ESTRADÉ, S., MENDOZA, J., LLORCA‐ISERN, N., & NICOLOPOULOS, S. (2013). Orientation and phase mapping in the transmission electron microscope using precession‐assisted diffraction spot recognition: state‐of‐the‐art results. Journal of Microscopy, 252(1), 23–34. 10.1111/jmi.12065
- Rauch, E. F., & Véron, M. (2014). Automated crystal orientation and phase mapping in TEM. Materials Characterization, 98, 1–9. 10.1016/j.matchar.2014.08.010
- Gammer, C., Burak Ozdol, V., Liebscher, C. H., & Minor, A. M. (2015). Diffraction contrast imaging using virtual apertures. Ultramicroscopy, 155, 1–10. 10.1016/j.ultramic.2015.03.015
- Paterson, G. W., Webster, R. W. H., Ross, A., Paton, K. A., Macgregor, T. A., McGrouther, D., MacLaren, I., & Nord, M. (2020). Fast Pixelated Detectors in Scanning Transmission Electron Microscopy. Part II: Post-Acquisition Data Processing, Visualization, and Structural Characterization. Microscopy and Microanalysis, 26(5), 944–963. 10.1017/s1431927620024307
- MacLaren, I., Fraser, A. T., Lipsett, M. R., & Ophus, C. (2024). Digital Dark Field—Higher Contrast and Greater Specificity Dark Field Imaging Using a 4DSTEM Approach. Microscopy and Microanalysis, 31(1). 10.1093/mam/ozae104
- MacLaren, I., Frutos-Myro, E., McGrouther, D., McFadzean, S., Weiss, J. K., Cosart, D., Portillo, J., Robins, A., Nicolopoulos, S., Nebot del Busto, E., & Skogeby, R. (2020). A Comparison of a Direct Electron Detector and a High-Speed Video Camera for a Scanning Precession Electron Diffraction Phase and Orientation Mapping. Microscopy and Microanalysis, 26(6), 1110–1116. 10.1017/s1431927620024411