According to one embodiment, an input unit repeatedly inputs a trigger signal originating from a specific cardiac phase from an electrocardiograph. An RR period determination unit determines whether the period between the input time point of the latest trigger signal, of repeatedly input trigger signals, and the input time point of an immediately previously input trigger signal is equal to or more than the preset first threshold, for each input of the latest trigger signal. A scan control unit terminates the generation of X-rays, if it is determined that the period is equal to or more than the first threshold.