This post has NOT been accepted by the mailing list yet.
I am trying to draw a polygon on the axial viewer given the coordinates of some fiducial points. I am using a model created from a polydata object so I can easily export it for my analysis.
I used this code in a scripted module and the polygon is correctly displayed in the 3D view but I don't know how to display it in the red view as well, which is what I need. Is that possible?
I've attached a screenshot at the end.
fidList = slicer.util.getNode('F')
if not fidList:
print "No points found"
numFids = fidList.GetNumberOfFiducials()
points_coords = 
for i in range(numFids):
fid_ras_coord = [0, 0, 0]
# Add the polygon to a list of polygons
polygons = vtk.vtkCellArray()
# Create PolyData
polygonPolyData = vtk.vtkPolyData()
model = slicer.vtkMRMLModelNode()
modelDisplay = slicer.vtkMRMLModelDisplayNode()