1. A method for motion compensation of image data of a moving scanned object, the image data being a spatially three-dimensional reconstruction from scan data and the scan data being acquired during a relative rotational movement between a radiation source and the scanned object within an angular range, wherein the angular range includes a plurality of angular sub-ranges, each angular sub-range being assigned to a temporal control point, said method comprising: (i) determining at least one value for an image metric of the image data, the image metric being a measure of motion artifacts in the image data; (ii) determining partial image data, the respective partial image data corresponding to respective spatially three-dimensional reconstruction from scan data of an angular sub-range; (iii) determining a respective motion field of the image data at a respective control point via an optimization method as a function of the image metric, wherein the respective motion field is a measure of respective motion of the image data; (iv) transforming the respective partial image data according to the motion described by the respective motion field; and (v) generating image data by merging the transformed respective partial image data, wherein the (i) to (v) are performed iteratively until a stop criterion is reached.