Closed Hooray-Lee closed 2 months ago
Hi @Hooray-Lee , sorry for the slow reply.
That result is surprising. What's the affine matrix for your volume? Also what orientation are you using in read
? If you use AP
, I would expect the camera to be drawn back along the y-direction
The output of perspective_projection
is 2D points that can be plotted on the DRR you rendered. What leads you to believe those outputs are wrong?
AP
means the X-ray camera is facing the anterior side of the CTPA
means the X-ray camera is facing the posterior side of the CTIt's illustrative to use orientation=None
to see why this argument is useful. By default, the X-ray camera points in the positive Z-direction. For most CTs, this is akin to point from the caudal-to-cranial axis, which does not produce useful DRRs. Since we usually want frontal/lateral projections, AP
and PA
reorients the coordinate frame in a way such that the Euler angle pose inputs are human-readable. This way, pose parameters in DiffDRR directly correspond to radiologic conventions (e.g., if you've ever heard the term LAO45
, this setup makes it very easy to parameterize such a pose in DiffDRR with minimal effort).
I implemented both AP
and PA
for cases when patients are supine and prone, respectively.
Hi! Thanks a lot for the excellent work! I am writing to report 3 issues I encountered while using your project.
Issue 1: I used the following specific parameters for DRR projection, and I specified the translation y as 595. Why is the translation of the camera relative to the volume data manifested on the x-axis?
Issue 2: I tried to test the results of perspective_projection. It seems not right. Did I do it wrong?
Issue 3: I don't understand what AP and PA specifically represent in the 'read' function? Why is it necessary to rotate around two coordinate axes? And which coordinate system are the coordinate axes referring to here? Can you please help me explain this?
Thank you for your time and consideration.