An X-ray detector, comprising: a) a layer of photosensitive material; b) an NxM array of photo-detector diodes arranged in said layer of photosensitive material; each of said photo-detector diodes having a bias potential interface and a diode output interface, said bias potential interface of each photo-detector diode being connected to a bias potential (V bias); c) an NxM array of readout unit cells, one readout unit cell for each photo-detector diode; said readout units being bump-bonded to the respective photo-detectdr diode; d) each readout unit cell comprising: d1) an input interface connected to said diode output interface, said X-ray detector being characterised in each readout unit cell further comprising: a high-gain voltage amplifying means comprising an integration capacitor (C fb), wherein the high-gain voltage amplifying means having a noise signal being small as compared to the signal generated by a single photon incident, d2) a first switch in parallel to the integration capacitor (C fb) for short-circuiting the integration capacitor (C fb), d3) a sample/hold capacitor (C S) disposed between a second switch and third switch, wherein the sample/hold capacitor (C s) is via the second switch connectable to an output of the high-gain voltage amplifying means and is connectable via the third switch to a signal output line; e) a multiplexing means comprising a row select and a column select circuit allowing to access each readout cell unit, i.e. to read out the analog signal as actually stored in the sample/hold capacitor (C S) to a data processing means controlling the multiplexing means. a) a layer of photosensitive material; b) an NxM array of photo-detector diodes arranged in said layer of photosensitive material; each of said photo-detector diodes having a bias potential interface and a diode output interface, said bias potential interface of each photo-detector diode being connected to a bias potential (V bias); c) an NxM array of readout unit cells, one readout unit cell for each photo-detector diode; said readout units being bump-bonded to the respective photo-detectdr diode; d) each readout unit cell comprising: d1) an input interface connected to said diode output interface, said X-ray detector being characterised in each readout unit cell further comprising: a high-gain voltage amplifying means comprising an integration capacitor (C fb), wherein the high-gain voltage amplifying means having a noise signal being small as compared to the signal generated by a single photon incident, d2) a first switch in parallel to the integration capacitor (C fb) for short-circuiting the integration capacitor (C fb), d3) a sample/hold capacitor (C S) disposed between a second switch and third switch, wherein the sample/hold capacitor (C s) is via the second switch connectable to an output of the high-gain voltage amplifying means and is connectable via the third switch to a signal output line; d1) an input interface connected to said diode output interface, said X-ray detector being characterised in each readout unit cell further comprising: a high-gain voltage amplifying means comprising an integration capacitor (C fb), wherein the high-gain voltage amplifying means having a noise signal being small as compared to the signal generated by a single photon incident, a high-gain voltage amplifying means comprising an integration capacitor (C fb), wherein the high-gain voltage amplifying means having a noise signal being small as compared to the signal generated by a single photon incident, d2) a first switch in parallel to the integration capacitor (C fb) for short-circuiting the integration capacitor (C fb), d3) a sample/hold capacitor (C S) disposed between a second switch and third switch, wherein the sample/hold capacitor (C s) is via the second switch connectable to an output of the high-gain voltage amplifying means and is connectable via the third switch to a signal output line; e) a multiplexing means comprising a row select and a column select circuit allowing to access each readout cell unit, i.e. to read out the analog signal as actually stored in the sample/hold capacitor (C S) to a data processing means controlling the multiplexing means.