Method for controlling an X-ray inspection of a test object through an X-ray inspection system, wherein the X-ray inspection system comprises: - a radiation source, - a radiation detector arranged at a predetermined distance from the radiation source, - a control device for controlling a rotational movement of the X-ray inspection system, the method comprising: - carrying out a determination of the danger zone for collision prevention between the test object and the X-ray inspection system, which rotate counter to one other about an axis of rotation running through the test object, wherein, by means of the radiation source and the radiation detector, those marginal rays are determined which, at a predetermined angle of rotation ( γ) between test object and radiation source-radiation detector arrangement, graze the outer contour of the test object at this angle of rotation ( γ), the determination of the danger zone comprising: determining the danger radius of the outer contour in relation to the axis of rotation of the test object for the predetermined angle of rotation ( γ), repeating the determination of the marginal rays for predetermined angles of rotation ( γ), which are distributed over 360°, and determining the respective danger radius, creating a table with the relevant parameters of the danger radii of the edge of the test object obtained for the predetermined angles of rotation ( γ), communicating the table to a control system of the rotational movement of the X-ray inspection system; - fully automated controlling of the X-ray inspection in such a way that, during the X-ray inspection of the test object, the control system does not move towards this area and ensures that no collision of the X-ray inspection system with the test object occurs when changing the position of the test object. - a radiation source, - a radiation detector arranged at a predetermined distance from the radiation source, - a control device for controlling a rotational movement of the X-ray inspection system, - carrying out a determination of the danger zone for collision prevention between the test object and the X-ray inspection system, which rotate counter to one other about an axis of rotation running through the test object, wherein, by means of the radiation source and the radiation detector, those marginal rays are determined which, at a predetermined angle of rotation ( γ) between test object and radiation source-radiation detector arrangement, graze the outer contour of the test object at this angle of rotation ( γ), the determination of the danger zone comprising: determining the danger radius of the outer contour in relation to the axis of rotation of the test object for the predetermined angle of rotation ( γ), repeating the determination of the marginal rays for predetermined angles of rotation ( γ), which are distributed over 360°, and determining the respective danger radius, creating a table with the relevant parameters of the danger radii of the edge of the test object obtained for the predetermined angles of rotation ( γ), communicating the table to a control system of the rotational movement of the X-ray inspection system; determining the danger radius of the outer contour in relation to the axis of rotation of the test object for the predetermined angle of rotation ( γ), repeating the determination of the marginal rays for predetermined angles of rotation ( γ), which are distributed over 360°, and determining the respective danger radius, creating a table with the relevant parameters of the danger radii of the edge of the test object obtained for the predetermined angles of rotation ( γ), communicating the table to a control system of the rotational movement of the X-ray inspection system; - fully automated controlling of the X-ray inspection in such a way that, during the X-ray inspection of the test object, the control system does not move towards this area and ensures that no collision of the X-ray inspection system with the test object occurs when changing the position of the test object.