A system and method that comprises an X-ray source configured to emit an X-ray beam an object positioned to receive the X-ray beam a detector configured to receive an attenuated beam of the X-rays through the object for measuring projection data from various orientations that can be used to generate spectral images in terms of energy-dependent linear attenuation coefficients, and a detector, as described above, comprising one or more energy-integrating detector elements and one or more photon counting detector elements in one or more detectors array or separate detector arrays. The photon counting detector elements may also use dynamic thresholds to define energy windows.