I've seen it done with semiconductor crystals where the x-ray forms electron hole pairs. If the incidence of photos striking is low enough, the energy of the photon can be determined by the amount of charge released. This is handy when determining the material types by X-ray fluorescence