1. A method of generating X-ray image data by way of an X-ray system having an X-ray source and an X-ray detector with a number of regularly arranged pixels, the method comprising: specifying a mathematical scattered radiation model with a plurality of parameters; scanning a test object by way of the X-ray system to generate a first raw dataset; inserting an X-ray mask with at least one region that is transparent to X-rays and with at least one region that is non-transparent to X-rays between the X-ray source and the test object, and scanning the test object by way of the X-ray system with the X-ray mask inserted to generate a second raw dataset; using the first raw dataset and the second raw dataset as a basis for determining parameter values for the parameters of the scattered radiation model, and calibrating the scattered radiation model with the parameters; scanning an examination object by way of the X-ray system to generate a third raw dataset; processing the third raw dataset with the calibrated scattered radiation model to generate a corrected third raw dataset; and using the corrected third raw dataset as a basis for generating a set of X-ray image data from the examination object.