I want to get the Projection Slice Intersection of a model node to two slice view.
I have calculated the projection matrix of the 2 images. The projection matrix projects 3D(RAS) coordinate to 2D(image) coordinate.
Is it possible to setup the slice view (or slice node) properties to get the right projection? If not, how can I do that?
You can enable projection of a model node into a slice view in Models module → Display → Slice display → Mode: Projection.
If you want to set this mode programmatically, then you can do that by modifying the display node of the model node:
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?