<div dir="ltr">Try writer-&gt;Write()<br><br>Jothy<br><br><div class="gmail_quote">On Thu, Dec 8, 2011 at 3:39 PM, Wenlong Wang <span dir="ltr">&lt;<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear all<br><br>I&#39;m trying to write my polydata object into a *.vtk file.<br><br>The polydata object has point data, polygon data and texture coordinates.<br>
<br>Here is what I do with vtkGenericDataObjectWriter<br><br>
vtkGenericDataObjectWriter* writer = vtkGenericDataObjectWriter::New();<br>writer-&gt;SetFileName(&quot;C:\\Users\\User1\\Desktop\\newpolydata.vtk&quot;);<br>writer-&gt;SetInput(polydata);          //polydata is my polydata object<br>

writer-&gt;Update();<br><br>But this asctually gives me nothing. No vtk file was generated.<br><br>Can anyone tell me what is wrong with my code? If it is totally wrong, would you please write a simple demo?<br><br>Thank you very much.<br>

<br>Best Regards<span class="HOEnZb"><font color="#888888"><br>Wenlong<br>
</font></span><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><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>