<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I am using the vtkContourWidget for segmentation and need to retrieve the node locations. I have the following code in C++ which works! but I need to implement this in Python. I am having trouble translating the last line of the code.<br><br> // Create a contour widget<br> vtkSmartPointer<vtkContourWidget> contourWidget = <br> vtkSmartPointer<vtkContourWidget>::New();<br> contourWidget->SetInteractor(renderWindowInteractor);<br> contourWidget->CreateDefaultRepresentation();<br> contourWidget->ContinuousDrawOn();<br><br>vtkContourRepresentation* rep = static_cast<vtkContourRepresentation *>(contourWidget->GetRepresentation());<br><br>Since there is no casting in python, how do I create a vtkContourRepresentation in Python given the subclass
vtkOrientedGlyphContourRepresentation, i.e. how do I translate:<br><br>
vtkContourRepresentation* rep = static_cast<vtkContourRepresentation
*>(contourWidget->GetRepresentation());<br>
<br>into python.<br><br>Any help would be appreciated.<br><br>Thanks,<br>Haider<br></td></tr></table><br>