X-ray photons are counted as to each of energy bands (bins) to which optimum energy ranges are provided, and an image with reduced noise is displayed in a short time. An energy range of at least one of multiple energy bands in an X-ray detector is adjusted, on the basis of a distribution of degrees of X-ray attenuation at respective energy levels, the distribution of degrees of X-ray attenuation being measured in advance with respect to a predetermined direction of a subject. By using the X-ray detector with the energy bands after the adjustment, photon-counting CT imaging is performed.