<div dir="ltr">Should be<br><br> rep =contourWidget.GetRepresentation()<br><br><br>Jothy<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"></td></tr></tbody></table><br>
<div class="gmail_quote">On Thu, Jun 24, 2010 at 8:59 PM, Haider Syed <span dir="ltr">&lt;<a href="mailto:hsyed88@yahoo.com">hsyed88@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">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&lt;vtkContourWidget&gt; contourWidget = <br>      vtkSmartPointer&lt;vtkContourWidget&gt;::New();<br>  contourWidget-&gt;SetInteractor(renderWindowInteractor);<br>  contourWidget-&gt;CreateDefaultRepresentation();<br>
  contourWidget-&gt;ContinuousDrawOn();<br><br>vtkContourRepresentation* rep = static_cast&lt;vtkContourRepresentation *&gt;(contourWidget-&gt;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&lt;vtkContourRepresentation 
*&gt;(contourWidget-&gt;GetRepresentation());<br>
<br>into python.<br><br>Any help would be appreciated.<br><br>Thanks,<br>Haider<br></td></tr></tbody></table><br>

      <br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>