1. A method for registering a three-dimensional image data record of a target region of a patient with a two-dimensional x-ray image of the target region recorded in a recording geometry, wherein, after prescribing an initial transformation as a test transformation to be optimized, the method comprises: selecting at least one rigid reference structure with an associated contour, visible in the x-ray image, from anatomical structures contained in the image data record, which were established during an evaluation; establishing a two-dimensional gradient x-ray image and a three-dimensional gradient data record of the image data record, wherein at least one two-dimensional gradient comparison image, which is forward projected in the recording geometry of the x-ray image using the test transformation, is established from the gradient data record; finding a neighborhood in the gradient x-ray image from a plurality of neighborhoods extending about test points for a plurality of contour points in the gradient comparison image corresponding to initial points on the three-dimensional contour of the at least one selected reference structure in the recording geometry of the x-ray image, which neighborhood best corresponds to a local neighborhood of the contour point due to a comparison measure and extends about a comparison point; establishing local two-dimensional displacement information by comparison of the contour points with the associated comparison points; establishing movement parameters of a three-dimensional movement model describing a movement of the target region between recording of the image data record and the x-ray image from the local two-dimensional displacement information; and establishing a registration transformation describing the registration by correcting the test transformation based on the movement parameters.