A computer-implemented medical data processing method for determining the position of an anatomical tracking structure in a tracking image usable for controlling radiation treatment such as at least one of radiotherapy or radiosurgery of a patient, the method comprising the following steps: a) planning image data (S11) is acquired which describes a planning image of the tracking structure; b) reference image data is acquired (S12) which describes a reference image of the tracking structure; c) the position of the tracking structure in the reference image is determined (S13); d) the reference image is processed (S14) to generate a binarized reference image being a binarization of the reference image; e) a selection is made (S15) from the binarized reference image based on the position of the tracking structure in the reference image, wherein the selection includes the tracking structure; f) the planning image is processed (S16) to generate at least one binarized planning image being a binarization of the at least one of the planning images; g) the position of the tracking structure in the binarized planning image is determined and a selection is made (S17) from the binarized planning image, wherein the selection includes the tracking structure; h) a template for determining the position of the tracking structure in another image is generated (S18) based on the selection from the binarized reference image and the selection from the binarized planning image; i) a two-dimensional monochrome image is acquired (S19) which describes the tracking structure; j) the monochrome image is processed (S120) to generate a binarized monochrome image being a binarization of the monochrome image; k) the position of the tracking structure in the binarized monochrome image is detected (S122) by matching the template with the binarized monochrome image. a) planning image data (S11) is acquired which describes a planning image of the tracking structure; b) reference image data is acquired (S12) which describes a reference image of the tracking structure; c) the position of the tracking structure in the reference image is determined (S13); d) the reference image is processed (S14) to generate a binarized reference image being a binarization of the reference image; e) a selection is made (S15) from the binarized reference image based on the position of the tracking structure in the reference image, wherein the selection includes the tracking structure; f) the planning image is processed (S16) to generate at least one binarized planning image being a binarization of the at least one of the planning images; g) the position of the tracking structure in the binarized planning image is determined and a selection is made (S17) from the binarized planning image, wherein the selection includes the tracking structure; h) a template for determining the position of the tracking structure in another image is generated (S18) based on the selection from the binarized reference image and the selection from the binarized planning image; i) a two-dimensional monochrome image is acquired (S19) which describes the tracking structure; j) the monochrome image is processed (S120) to generate a binarized monochrome image being a binarization of the monochrome image; k) the position of the tracking structure in the binarized monochrome image is detected (S122) by matching the template with the binarized monochrome image. <EOS>