1. A method for achieving high dynamic range detection based on multi-threshold photon counting, comprising: acquiring a detector response, the detector response comprising counts detected upon absorption of photons by a sensor; modeling the detector response to result in a modeled detector response; fitting the modeled detector response on a pixel-by-pixel basis to acquire a plurality of information for the detector response; generating composite images from the plurality of information for the detector response; and separating composite images into individual contributions from different X-ray energies by fast linear fitting.