DRR generation - how to get corresponding 2D pixel location

Skip to first unread message

Yifan Wu

Jun 7, 2022, 7:15:32 PM6/7/22
to plast...@googlegroups.com
Hi Plastimatch team,

I am using Plastimatch to generate DRR images. The tool will automatically save camera parameters in .txt files. My question is how to get the corresponding pixel location in 2D if I know the 3D point in image volume and such txt. 

For example, my image volume is: size [512, 512, 224], spacing [0.433594, 0.433594, 0.625], so the center of the object is [110.78, 110.78, 69.68]. The 3D point in the image volume is X = [u, v, w]. In the world frame, its location is: 
X = X*spacing-center.
Then my projected point location in 2D should be x = PX, where P is the camera matrix generated by Plastimatch (in the following figure). However, I didn't get the correct match point. I am wondering where I could go wrong. Any suggestion would be helpful!

Thanks very much in advance!
Untitled presentation.png

Yifan Wu

Jun 7, 2022, 7:33:30 PM6/7/22
to plast...@googlegroups.com
I solved the problem. Thank you so much!!
Reply all
Reply to author
0 new messages