Disclosed is a computer-implemented method for determining a target position of an X-ray device which encompasses acquiring image data describing an anatomical structure of a patient, for example, by means of a 3D scan, and registering the image data relative to a coordinate system of the patient, for example by means of a navigation system (embodied by registered image data). Furthermore, a trajectory of an implant positioned within the anatomical structure relative to the patient coordinate system is acquired (embodied by trajectory data). A target position of an X-ray device for acquiring an X-ray image of at least part of the implant is determined based on the registered image and the acquired trajectory of the implant (embodied by X-ray device position data).