A computer implemented method for determining a two dimensional DRR referred to as dynamic DRR based on a 4D-CT, the 4D-CT describing a sequence of three dimensional medical computer tomographic images of an anatomical body part of a patient, the images being referred to as sequence CTs, the 4D-CT representing the anatomical body part at different points in time, the anatomical body part comprising at least one primary anatomical element and secondary anatomical elements, the computer implemented method comprising the following steps: • acquiring the 4D-CT; • acquiring (S22, S32, S52, S61) a planning CT, the planning CT being a three dimensional image used for planning of a treatment of the patient, the planning CT being acquired based on at least one of the sequence CTs or independently from the 4D-CT, • acquiring a three dimensional image, referred to as undynamic CT, from the 4D-CT, the undynamic CT comprising at least one first image element representing the at least one primary anatomical element and second image elements representing the secondary anatomical elements; • acquiring at least one trajectory, referred to as primary trajectory, based on the 4D-CT, the at least one primary trajectory describing a path of the at least one first image element as a function of time; • acquiring trajectories of the second image elements, referred to as secondary trajectories, the secondary trajectories representing changes of positions of the second image elements in the sequence CTs and being determined based on the 4D-CT; • for the image elements of the undynamic CT, determining trajectory similarity values based on the at least one primary trajectory and the secondary trajectories, the trajectory similarity values respectively describing a measure of similarity between a respective one of the secondary trajectories and the at least one primary trajectory; • determining (S24, S36, S49, S59, S66) the dynamic DRR by using the determined trajectory similarity values, and, in case the planning CT is acquired independently from the 4D-CT, further using a transformation referred to as planning transformation from the undynamic CT to the planning CT, at least a part of image values of image elements of the dynamic DRR being determined by using the trajectory similarity values. • acquiring the 4D-CT; • acquiring (S22, S32, S52, S61) a planning CT, the planning CT being a three dimensional image used for planning of a treatment of the patient, the planning CT being acquired based on at least one of the sequence CTs or independently from the 4D-CT, • acquiring a three dimensional image, referred to as undynamic CT, from the 4D-CT, the undynamic CT comprising at least one first image element representing the at least one primary anatomical element and second image elements representing the secondary anatomical elements; • acquiring at least one trajectory, referred to as primary trajectory, based on the 4D-CT, the at least one primary trajectory describing a path of the at least one first image element as a function of time; • acquiring trajectories of the second image elements, referred to as secondary trajectories, the secondary trajectories representing changes of positions of the second image elements in the sequence CTs and being determined based on the 4D-CT; • for the image elements of the undynamic CT, determining trajectory similarity values based on the at least one primary trajectory and the secondary trajectories, the trajectory similarity values respectively describing a measure of similarity between a respective one of the secondary trajectories and the at least one primary trajectory; • determining (S24, S36, S49, S59, S66) the dynamic DRR by using the determined trajectory similarity values, and, in case the planning CT is acquired independently from the 4D-CT, further using a transformation referred to as planning transformation from the undynamic CT to the planning CT, at least a part of image values of image elements of the dynamic DRR being determined by using the trajectory similarity values.