Canonical quantization of the electromagnetic (EM) field is carried out for the situation where the total charge and current densities are the sum of contributions from neutral dielectric atoms whose effect is to be described purely classically in terms of spatially dependent electric permittivity and magnetic permeability functions, and neutral, stationary radiative atoms whose interaction with the EM field is to be treated quantum mechanically. The coefficients for the expansion of the vector potential in terms of mode functions determined from a generalized Helmholtz equation are chosen as independent generalized coordinates for the EM field. The spatially dependent electric permittivity and magnetic permeability appear in a generalized Helmholtz's equation and the former also occurs in the mode function orthogonality and normalization conditions. The quantum Hamiltonian is derived in a generalized multipolar form rather than the minimal coupling form obtained in other work. The radiative energy is the sum of quantum harmonic oscillator terms, one for each mode. The modes are independent in the present case of exact mode functions associated with the spatially dependent electric permittivity and magnetic permeability, there being no direct mode-mode coupling terms. In the electric dipole approximation the electric interaction energy contribution for each mode and radiative atom is proportional to the scalar product of the dipole operator with the mode function evaluated at the atom, times the annihilation operator, plus the Hermitian adjoint. This form has been widely used in studies of radiative processes for atomic systems in dielectric media, and it is justified here via the canonical quantization procedure. The results apply to the theoretical treatment of numerous quantum optical experiments involving such interactions in the presence of passive, lossless, dispersionless, linear classical optics devices such as resonator cavities, lenses, beam splitters, and so on. An illustrative application of the theory for atomic decay in a one-dimensional Fabry-Perot cavity is given. \textcopyright{} 1996 The American Physical Society.