A data processing method of determining a transformation for transforming medical image data into a positional reference system, the method being executed by a computer and comprising the following steps: a) acquiring reference position data comprising reference position information describing a reference position of a medical imaging apparatus in an imaging apparatus reference system; b) acquiring imaging geometry data comprising imaging geometry information describing an imaging geometry of the medical imaging apparatus; c) acquiring actual position data comprising actual position information describing different actual positions of the medical imaging apparatus in an imaging apparatus reference system, wherein the medical imaging apparatus takes the actual positions for acquiring medical image data comprising medical image information describing an image of the anatomical region of the patient's body at each of the actual positions; d) determining, based on the reference position data and the imaging geome