Neglect of tissue and applicator heterogeneities in brachytherapy treatment planning is due in part to lack of accurate, general, and fast three-dimensional (3D) dose-computation algorithms. A novel dose-calculation algorithm that accounts for the lateral dimensions and location of the heterogeneity as well as its thickness has been developed. For simple 2D, water-equivalent density heterogeneities, the algorithm is shown to be applicable to a wide range of photon energies and is 500-1000 times more efficient than Monte Carlo photon-transport calculations. The model is based upon reducing the bounded 2D heterogeneity problem to two 1D problems by dividing the scattering volume into two regions: A cone-shaped region that subtends the heterogeneity with its apex at the source and the complementary cone that contributes scatter dose by diffusion around the heterogeneity. The input data consist of precalculated scatter-to-primary ratios (SPRs) for collimated isotropic point sources. The central-axis "mini-beam" problem for a slab heterogeneity is solved by a simple 1D scatter integration model that accounts for both the thickness of the heterogeneity and its location relative to the point of interest. The scatter contribution arising outside the mini-beam is modeled as the difference in SPRs corrected for transmission through the heterogeneity. The algorithm agrees, on average, with sample Monte Carlo calculations within 1% to 7% for 125I, 192Ir, and 100 keV point sources along the axes of water-equivalent cylindrical heterogeneities (rho = 0-12.6 g/cm3, 3.6, and 24 mm diameters, and dose-perturbation factors of 0.44-1.33 relative to the homogeneous case). The potential of generalizing the scatter-subtraction approach to encompass 3D heterogeneities, those consisting of high-atomic number media, and those of irregular shape, is discussed.