I am trying to correctly overlay 3D polydata of organs we obtained from a patient’s MRI onto an X-Ray Fluoroscopy (projection) image of the same person. In X-Ray projection, items closer to the X-Ray source appear larger than items that are closer to the detector:
For our 3D polydata overlay to be correct, the same perspective transform should be applied to our view.
I have tried using a vtkCamera to simulate the projection, but it uses the inverse projection of what we need, i.e. items closer to the near clipping plane are bigger than those further away. Looking at this image:
We would like to have the perspective from the back clipping plane, so the cylinder and pyramid would appear in front of the spheres, but smaller.
Is this possible in VTK? And if so, what would be the most straightforward way to implement this?
using an explicit transform on the vtkCamera
projecting the polydata on another plane using custom projection matrices on the polydata and overlay this on top of our XR image
If I am reading it right, all you need to do is swap the position and focal point of the camera. Maybe an image of current rendering and expected rendering would help.