A CT apparatus comprises a sensor section outputting distance data for determining a distance between the sensor section and at least part of a subject to be examined laid on a cradle contour-data generating means for generating contour data representing a contour of the at least part of the subject based on the distance data obtained from the sensor section and deciding means for deciding whether or not there is a risk for said subject to come into contact with said gantry while said gantry or said table is moving based on data representing a limit of a range up to which said subject can come close to the gantry and on said contour data.