I have implemented a code to get the corresponding 2D projection coordinate (i.e. x, y positions) of each vertex coordinate (i.e. 3D) on the DRR image projection plane.

But, I have a problem regarding this DRR projection code since it actually works for the projection angle zero, but if I project the same point cloud with a different angle say for example 90, then these projected points not aligned with the correct location in the corresponding DRR image.

In order to test this algorithm, I have first created a volumetric liver mesh and then voxelized it as a .mhd file to get the DRR images using SiddonJacobRay tracing algorithm [1] for different gantry rotations. Then I attempt to project the points of the liver mesh to each DRR images by providing the corresponding projection angle to the algorithm.

See the attached images for your further reference.

For this implementation I have referred links given below in addition to the link provided in [1].

I need your big help to resolve this issue.

For projection angle 0

For projection angle 36

For projection angle 72

[4] ITK/itkImageBase.hxx at master · InsightSoftwareConsortium/ITK · GitHub

[5] ITK/itkImageBase.h at master · InsightSoftwareConsortium/ITK · GitHub