Direct and indirect detectors for X-ray photon counting systems