There are deviations between generated DRR image and corresponding EPID image


I want to generate the DRR image from the CT and register it with the corresponding EPID image. However, there are always deviations between the generated DRR image and its corresponding EPID image. The EPID is obtained when the couch rotation is 326.5° and the gantry rotation is 31.5°. So I generated my DRR image according to these parameters.
When the rotations and translations are both 0, the DRR image is generated as shown below:

, It seems that the focal point is at the top of the head.
So the rotations are rx = 90 first (this is to put the CT volume down, and the focal point remains unchanged and now at the top of the face) .

Then the rotation rz = 146.5 to simulate the couch rotation. Finally, the ry = 31.5 to simulate the gantry rotation. All the centers set for the three rotations are the center of the image(0,114,-12.8). The focal point is at (0,114,987.2). The center of the DRR image is at(0, 114, -512.8).
The generated DRR seems to rotate as I want; however, there are deviations in the x and y axes between the DRR image and the corresponding EPID image.

This is the DRR image I generated.

This is the corresponding EPID image.
I want to know why this problem occurred and how can I solve this problem?
This problem has tracked me for several days.

To be sure that I understand your question: are you only concerned by the geometry? If yes, I think that the problem is the location of the rotation center. Do you know its coordinates in the original CT image that you project? If yes, which code are you using to calculate the DRR?

Yes, I only concern the geometry.

Thanks for your reply! This is the information of CT image. I use the DigitallyReconstructedRadiograph1.cxx code of the ITK example to generate DRR. The rotation center is all the same for the three rotation (rx, rz and ry), which is (0, 114.2, -12.8).

The information you provide only indicates the coordinate system of the image. It does not provide the rotation center. I have never used DigitallyReconstructedRadiograph1.cxx but it does indicate the possibility to set the rotation center:

Thanks for your reply. The rotation center in my code is set exactly to the center of the CT image, which is (0, 114.2, -12.8).

So you probably want to adjust it, exactly if you know where is the rotation center or manually if not…