An apparatus suitable for detecting X-ray is disclosed. In one example, the apparatus comprises an X-ray absorption layer comprising a first pixel and a second pixel, and a controller. The controller is configured for determining that carriers generated by a single X-ray photon are collected by the first pixel and the second pixel. The controller is also configured for determining energy of the single X-ray photon based on a first voltage detected from the first pixel and a second voltage detected from the second pixel. The first voltage and the second voltage are caused by the single X-ray photon.