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; generating a preprocessed 3D image dataset from the initial 3D image datasets; determining a plurality of substitute data values for the preprocessed 3D image dataset during the preprocessing by interpolating data values of the 2D image datasets; 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 3D image dataset that is free of traces of the metal object once the predetermined criterion is satisfied.