From counts detected by a photon counting detector, influence of X-ray attenuation caused by physical phenomena such as beam hardening is removed or reduced in each energy bin. Based on counts detected by a photon counting detector (24), a characteristic of X-ray attenuation amounts µt is acquired for each of X-ray energy bins. This characteristic is defined by a plurality of mutually different known thicknesses t and linear attenuation coefficients µ provided in the X-ray transmission direction through a substance. This substance is composed of a material which is included in an object being imaged and which is the same in type as the object (the same type of substance) or which can be regarded as being similar to the object in terms of the effective atomic number. Correcting data for replacing the characteristic of the X-ray attenuation amounts µt by a linear target characteristic are calculated. The linear target characteristic is set to pass through the origin of a two-dimensional coordinate system having a lateral axis assigned to thicknesses t and a longitudinal axis assigned to the X-ray attenuation amounts µt. The correcting data are calculated for each of the X-ray energy bins.