A method and apparatus is provided to generate material-component images from spectral computed tomography (CT) projection data, using material decomposition in both the sinogram and image domains. From material components in the sinogram domain, monoenergetic sinograms are generated, and then monoenergetic images are reconstructed from the monoenergetic sinograms. Next, the monoenergetic images are decomposed into material-component images. Material decomposition in the sinogram domain enables beam-hardening corrections, and material decomposition in the image domain enhances image quality using prior information regarding the images including (e.g., smoothness and volume constraints) and using image-domain calibrations. Additionally, the method can be improved using scatter correction and detector-response and energy-spectrum calibrations. Further, iterations of the method can be performed by feeding back the material-component images to improve the scatter correction.