An imaging system for imaging an object, the imaging system including an x-ray source and a spectral radiation detector for detecting x-ray and gamma photons and the system being configured to operate in an x-ray imaging mode, in which the radiation detector is operated to register detection events caused by incident x-ray photons emitted by the x-ray source and having traversed the object, and in a gamma imaging mode, in which the radiation detector is operated to register detection events caused by incident gamma photons emitted by the object, and the system being configured to operate in a hybrid imaging mode in which the x-ray source and the radiation detector rotate around the object to be imaged and register detection events at a plurality of angular positions, at each position the radiation detector being operated in the x-ray imaging mode in a first time interval and in the gamma imaging mode in a second time interval, the radiation detector comprising a conversion unit including a plurality of detector pixels (206 1,...,M ) and configured for generating for each detection event a detection signal indicative of an energy of the detection event, and the system being characterized in that the radiation detector further comprises a counting unit including for each detector pixel (206 1,...,M ) a plurality of comparators (209 i;1,...,N ) and configured for associating each detection event to one of a plurality of predetermined energy bins on the basis of the detection signals using the comparators (209 i;1,...,N ), wherein, in the x-ray imaging mode, the comparators (209 i;1,...,N ) of one pixel (206 1,...,M ), and, in the gamma imaging mode, the comparators (209 i;1,...,N ) of several pixels (206 1,...,M ) are available for the association so that the number of energy bins available for the association in the gamma imaging mode is larger than the number of energy bins available for the association in the x-ray imaging mode. the imaging system including an x-ray source and a spectral radiation detector for detecting x-ray and gamma photons and the system being configured to operate in an x-ray imaging mode, in which the radiation detector is operated to register detection events caused by incident x-ray photons emitted by the x-ray source and having traversed the object, and in a gamma imaging mode, in which the radiation detector is operated to register detection events caused by incident gamma photons emitted by the object, and the system being configured to operate in a hybrid imaging mode in which the x-ray source and the radiation detector rotate around the object to be imaged and register detection events at a plurality of angular positions, at each position the radiation detector being operated in the x-ray imaging mode in a first time interval and in the gamma imaging mode in a second time interval, the radiation detector comprising a conversion unit including a plurality of detector pixels (206 1,...,M ) and configured for generating for each detection event a detection signal indicative of an energy of the detection event, and the system being characterized in that the radiation detector further comprises a counting unit including for each detector pixel (206 1,...,M ) a plurality of comparators (209 i;1,...,N ) and configured for associating each detection event to one of a plurality of predetermined energy bins on the basis of the detection signals using the comparators (209 i;1,...,N ), wherein, in the x-ray imaging mode, the comparators (209 i;1,...,N ) of one pixel (206 1,...,M ), and, in the gamma imaging mode, the comparators (209 i;1,...,N ) of several pixels (206 1,...,M ) are available for the association so that the number of energy bins available for the association in the gamma imaging mode is larger than the number of energy bins available for the association in the x-ray imaging mode. <EOS>