A radiotherapy system (1; 100; 200) comprising: a first radiation source (12; 14-2; 72) configured to generate radiation for observation; a first detector (13; 15-2; 73) configured to detect radiation generated from the first radiation source (12; 14-2; 72) and transmitted through a subject; a second radiation source (12-2; 85) configured to generate radiation for radiotherapy; a counting processing unit (20; 20-2) configured to generate first counting data, the first counting data including count value of photons included in a preset energy range based on a first output signal from the first detector (13; 15-2; 73); and configured to remove from the first counting data counting data associated with an incidence event of scattered rays of radiation from the second radiation source (12-2; 85); and an image generating unit configured to generate first medical image data based on the first counting data; a support mechanism (11-2, 26-2, 28-2) configured to support the first radiation source (12; 14-2; 72), the first detector (13; 15-2; 73), and the second radiation source (12-2; 85) so as to make the first radiation source (12; 14-2; 72) and the first detector (13; 15-2; 73) face each other through the subject; and the counting data processing unit (20; 20-2) comprising an extraction unit (34, 34-2, 66-2) configured to extract first counting data with reduced noise component from the first acquired data by using a threshold which is set to an energy value corresponding to a window band which has an incident X-ray peak energy at its center and an energy width corresponding to an energy resolution of the detector (13, 15-2, 73), the reduced noise component being of an energy region lower than the threshold. a first radiation source (12; 14-2; 72) configured to generate radiation for observation; a first detector (13; 15-2; 73) configured to detect radiation generated from the first radiation source (12; 14-2; 72) and transmitted through a subject; a second radiation source (12-2; 85) configured to generate radiation for radiotherapy; a counting processing unit (20; 20-2) configured to generate first counting data, the first counting data including count value of photons included in a preset energy range based on a first output signal from the first detector (13; 15-2; 73); and configured to remove from the first counting data counting data associated with an incidence event of scattered rays of radiation from the second radiation source (12-2; 85); and an image generating unit configured to generate first medical image data based on the first counting data; a support mechanism (11-2, 26-2, 28-2) configured to support the first radiation source (12; 14-2; 72), the first detector (13; 15-2; 73), and the second radiation source (12-2; 85) so as to make the first radiation source (12; 14-2; 72) and the first detector (13; 15-2; 73) face each other through the subject; and the counting data processing unit (20; 20-2) comprising an extraction unit (34, 34-2, 66-2) configured to extract first counting data with reduced noise component from the first acquired data by using a threshold which is set to an energy value corresponding to a window band which has an incident X-ray peak energy at its center and an energy width corresponding to an energy resolution of the detector (13, 15-2, 73), the reduced noise component being of an energy region lower than the threshold.