On Sun, Oct 24, 2010 at 11:59 AM, shengweng <<a href="mailto:shengwen.guo@gmail.com">shengwen.guo@gmail.com</a>> wrote:<br>><br>> Thanks for your quick response.<br>> I have tried the method before, but I could only display the contours, and could not get surface.<br>
> The following code you pointed out generated the PolyData explicitly, but the ContourWidget create the PolyData implicitly, I don't know how to check if the contours are stored in the PolyData correctly and there were points and lines, no<br>
> 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->GetRepresentation())->GetContourRepresentationAsPolyData();<br><br></div><div>Give that a shot and let us know how it goes.</div>
<div><br>David<br></div>