Quantum theoretical deduction of radiative transfer equations in the spectral line regime