1. A system for imaging an object comprising: an x-ray generator configured to produce photons; a non-transitory computer readable medium programmed to: model the photons in multiple energy bins; attenuate the photons using a material decomposition approach, such that the photons are then incident on a PCXD pixel, where an x-ray spectrum is distorted as described by an SR of the PCXD; determine the output of one of the multiple energy bins by finding counts within a corresponding energy range of the x-ray spectrum that has been distorted.