A two-dimensional, indirect photon-counting X-ray detector for an analytical X-ray system comprising: a scintillator screen (10; 20) for absorbing an incident X-ray signal in a two-dimensional detection area and for emitting an optical signal in response thereto that has a common spatial distribution with the incident X-ray signal; a two-dimensional optical CMOS sensor (14; 22) configured to be operated in non-destructive readout mode coupled directly to the scintillator screen (10; 20) for detecting said optical signal emitted thereby and for generating an electrical output signal (16; 26) indicative of said spatial distribution of the detected optical signal; and characterized by comprising - a signal filter for receiving the electrical output signal (16; 26) and for removing high intensity signal contributions therefrom that are indicative of direct interaction between said X-ray signal and said optical sensor (14; 22), and - a computer configured to - receive a plurality of sequential non-destructive measurements of the optical sensor (14; 22), - time-average said plurality of sequential non-destructive measurements to produce a low-noise background frame, and - subtract a subsequent frame therefrom to determine whether one or more X-ray photons were absorbed by the scintillator screen (10; 20). a scintillator screen (10; 20) for absorbing an incident X-ray signal in a two-dimensional detection area and for emitting an optical signal in response thereto that has a common spatial distribution with the incident X-ray signal; a two-dimensional optical CMOS sensor (14; 22) configured to be operated in non-destructive readout mode coupled directly to the scintillator screen (10; 20) for detecting said optical signal emitted thereby and for generating an electrical output signal (16; 26) indicative of said spatial distribution of the detected optical signal; and characterized by comprising - a signal filter for receiving the electrical output signal (16; 26) and for removing high intensity signal contributions therefrom that are indicative of direct interaction between said X-ray signal and said optical sensor (14; 22), and - a computer configured to - receive a plurality of sequential non-destructive measurements of the optical sensor (14; 22), - time-average said plurality of sequential non-destructive measurements to produce a low-noise background frame, and - subtract a subsequent frame therefrom to determine whether one or more X-ray photons were absorbed by the scintillator screen (10; 20). - a signal filter for receiving the electrical output signal (16; 26) and for removing high intensity signal contributions therefrom that are indicative of direct interaction between said X-ray signal and said optical sensor (14; 22), and - a computer configured to - receive a plurality of sequential non-destructive measurements of the optical sensor (14; 22), - time-average said plurality of sequential non-destructive measurements to produce a low-noise background frame, and - subtract a subsequent frame therefrom to determine whether one or more X-ray photons were absorbed by the scintillator screen (10; 20). - receive a plurality of sequential non-destructive measurements of the optical sensor (14; 22), - time-average said plurality of sequential non-destructive measurements to produce a low-noise background frame, and - subtract a subsequent frame therefrom to determine whether one or more X-ray photons were absorbed by the scintillator screen (10; 20). <EOS>