<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 9, 2014 at 4:55 PM, Sam Raby <span dir="ltr"><<a href="mailto:rabysam28@gmail.com" target="_blank">rabysam28@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">In the following VTK example:<div><br></div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface</a><br></div>
<div><br></div><div>after the surface of sphere is generated, I am trying to simply save the surface as a vtp file using the following code, but I can not, that is, the saved file does not show anything. Can anyone help why this happens? Thanks. </div>
<div><br></div><div><div> </div><div> vtkPolyData *myvtkPolyData = vtkPolyData::SafeDownCast( surfaceMapper->GetInputAsDataSet() );</div><div> vtkSmartPointer<vtkXMLPolyDataWriter> writer = vtkSmartPointer<vtkXMLPolyDataWriter>::New();</div>
<div> writer->SetFileName("/home/surface.vtp");</div><div> writer->SetInputData( myvtkPolyData );</div><div> writer->SetDataModeToBinary();</div><div> writer->Write();</div></div></div></blockquote>
<div><br></div>What do you mean it does not show anything? How are you trying to view it? I would suggest using Paraview.<div class="gmail_extra"><br clear="all"><div>David <br></div></div></div></div></div>