modelNode.GetDisplayNode().SetSliceDisplayModeToProjection() This line projects the model node to Axial, Coronal and Sagittal plane, however, the image planes are not parallel to these three planes.
The projection geometry is calculated using DLT algorithm and represented by projection matrix. I want to project the model node using the projection matrix, is it possible?
You can set slice view planes to any position and orientation, so you can use it for any parallel projection.
If you want to do perspective projection then you can set the transform and the model’s polydata as as inputs in vtkTransformPolyDataFilter and set the result in a new model node for visualization.
If you do stent visualization for augmented/simulated fluroscopy then you may also consider using a 3D view for rendering, as it can render both the DRR and devices in 3D in real-time.
I noticed that there is a method SetSliceToRASByNTP to set the position and orientation. However, my image is a 2D image, when the position is not the center of the image or orientation is not perpendicular to the Z-axis(IS axis), part of the image is not visible, just like the screenshots below:
My goal is to do the similar thing but instead of DRR, I’m using a real X-Ray image, so rendering it in 3D view has the similar problem as I mentioned above. How can I solve that?