1. A method for acquiring a 3D image dataset, comprising: acquiring a plurality of 2D image datasets with a metal object imaged in at least some of the 2D image datasets using an X-ray image recording device; reconstructing an initial 3D image dataset from the 2D image datasets, wherein the initial 3D image includes artifacts comprising traces of the metal object; generating a preprocessed 3D image dataset from the initial 3D image datasets that is lower in artifacts by determining a plurality of substitute data values for data values associated with the metal object for the preprocessed 3D image dataset during the preprocessing by interpolating data values of the 2D image datasets; optimizing the substitute data values from the preprocessed 3D image dataset to further minimize artifacts by: determining a value of a target function from the preprocessed 3D image dataset that is dependent on the substitute data values; iteratively determining the substitute data values until the value of the target function satisfies a predetermined criterion; and reconstructing a further 3D image dataset that is free of traces of the metal object once the predetermined criterion is satisfied, wherein the value of the target function is determined by calculating a gradient of data values of the preprocessed 3D image dataset, eliminating residual artifacts in the preprocessed 3D image dataset by minimizing gradient in the target function, wherein the target function is defined as follows: Z ⁡ ( s _ ) = ∑ i ⁢ ∑ ( u s , v s ) ⁢ ∑ r j ∈ Li ; ( u s , u s ) ⁢  ∇ ⇀ ⁢ f ⁡ ( r ⇀ , s _ )  , s is a vector of the interpolated data values (u s ,v 2 ) is a point in a plane of an X-radiation detector of the X-ray image recording device, Li (us, vs) a line passing through X-rays originating from a X-radiation source of the X-ray image recording device, {right arrow over (r)} is a location of a voxel in the preprocessed 3D image dataset, and |{right arrow over (∇)}f({right arrow over (r)}, s )| is the gradient in three spatial directions, predetermined criterion is defined that the gradient does not exceed a threshold value.