<br><div class="gmail_quote">On Sun, Oct 24, 2010 at 9:53 PM, shengweng <span dir="ltr"><<a href="mailto:shengwen.guo@gmail.com">shengwen.guo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
I have tried the method before, but I could only display the contours, and<br>
could not get surface.<br>
The following code you pointed out generated the PolyData explicitly, but<br>
the ContourWidget create the PolyData implicitly, I don't know how to check<br>
</div>if the contours are stored in the PolyData correctly and there were points<br>
and lines, no vertex,cells in the PolyData.<br>
How to incorporate the 2-D contours including points and lines with<br>
z-depth(slice dimension) and then convert them into effective PolyData with<br>
x,y,z values?<br></blockquote><div><br>As David already mentioned, get the polydata from each contour widget as :<br><br> rep = vtkContourRepresentation::SafeDownCast(widget->GetRepresentation())<br> vtkPolyData* polydata = rep->GetContourRepresentationAsPolyData();<br>
<br>Then use vtkAppendPolyData to append them. The pass it onto the vtkVoxelContoursToSurfaceFilter, taking care to set the aspect (spacing) on the filter appropriately based on the sampling of your image / size of the contours.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Create-3-D-surface-from-2-D-contours-of-slices-tp3234422p3234470.html" target="_blank">http://vtk.1045678.n5.nabble.com/Create-3-D-surface-from-2-D-contours-of-slices-tp3234422p3234470.html</a><br>
</font><div><div></div><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br>