On Sun, Oct 24, 2010 at 11:59 AM, shengweng &lt;<a href="mailto:shengwen.guo@gmail.com">shengwen.guo@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; Thanks for your quick response.<br>&gt; I have tried the method before, but I could only display the contours, and could not get surface.<br>
&gt;  The following code you pointed out generated the PolyData explicitly, but the ContourWidget create the PolyData implicitly, I don&#39;t know how to check if the contours are stored in the PolyData correctly and there were points and lines, no<br>
&gt; vertex,cells in the PolyData.<br><br>You should be able to get an explicit PolyData of the contour from the widget by casting the GetRepresentation() as a  vtkOrientedGlyphContourRepresentation (<a href="http://www.vtk.org/doc/nightly/html/classvtkOrientedGlyphContourRepresentation.html#_details">http://www.vtk.org/doc/nightly/html/classvtkOrientedGlyphContourRepresentation.html#_details</a>) and use the GetContourRepresentationAsPolyData () function.<div>
<br>vtkPolyData* polydata = vtkOrientedGlyphContourRepresentation::SafeDownCast(widget-&gt;GetRepresentation())-&gt;GetContourRepresentationAsPolyData();<br><br></div><div>Give that a shot and let us know how it goes.</div>
<div><br>David<br></div>