The registration of volumetric structures in real space involves geometric and density transformations that align a target map and a probe map in the best way possible. Many computational docking strategies exist for finding the geometric transformations that superimpose maps, but the problem of finding an optimal density transformation, for the purposes of difference calculations or segmentation, has received little attention in the literature. We report results based on simulated and experimental electron microscopy maps, showing that a single scale factor (gain) may be insufficient when it comes to minimizing the density discrepancy between an aligned target and probe. We propose an affine transformation, with gain and bias, that is parameterized by known surface isovalues and by an interactive centering of the "cancellation peak" in the surface thresholded difference map histogram. The proposed approach minimizes discrepancies across a wide range of interior densities. Owing to having only two parameters, it avoids overfitting and requires only minimal knowledge of the probe and target maps. The linear transformation also preserves phases and relative amplitudes in Fourier space. The histogram matching strategy was implemented in the newly revised volhist tool of the Situs package, version 2.6.