[vtkusers] How to write a polydata into a vtk file

Jothybasu Selvaraj jothybasu at gmail.com
Thu Dec 8 10:52:12 EST 2011


Try writer->Write()

Jothy

On Thu, Dec 8, 2011 at 3:39 PM, Wenlong Wang <scc.wwl at gmail.com> wrote:

> Dear all
>
> I'm trying to write my polydata object into a *.vtk file.
>
> The polydata object has point data, polygon data and texture coordinates.
>
> Here is what I do with vtkGenericDataObjectWriter
>
> vtkGenericDataObjectWriter* writer = vtkGenericDataObjectWriter::New();
> writer->SetFileName("C:\\Users\\User1\\Desktop\\newpolydata.vtk");
> writer->SetInput(polydata);          //polydata is my polydata object
> writer->Update();
>
> But this asctually gives me nothing. No vtk file was generated.
>
> Can anyone tell me what is wrong with my code? If it is totally wrong,
> would you please write a simple demo?
>
> Thank you very much.
>
> Best Regards
> Wenlong
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111208/49c2c512/attachment.htm>


More information about the vtkusers mailing list