[vtkusers] vtkPolyDataReader: error reading ascii data!

Tao Kai caesartaoyz at gmail.com
Sun Oct 8 22:53:01 EDT 2006


Hi everyone,

I use vtkPolyDataWriter to write into a pdw file a successfully segmented
volume data, using the statements below:

vtkPolyDataWriter* writer=vtkPolyDataWriter::New();
 writer->SetInput(marchingcube->GetOutput());
 writer->SetFileName("heart.pdw");
 writer->Write();

and use vtkPolyDataReader to retrieve the data from that file afterwards:

vtkPolyDataReader* reader2=vtkPolyDataReader::New();
 reader2->SetFileName("heart.pdw");
 reader2->Update();

but an error arise with the message:

Generic Warning: In \vtk-4-2\Io\vtkDataReader.cxx, line 833
Error reading ascii data!

I have tried reading another pdw file using vtkPolyDataReader class
successfully, so I guess there might be something
wrong with the vtkPolyDataReader---is there any other parameters/properties
I have to set before writing to file?

BTW: there is no problem with marchingcube->GetOutput(). It can be correctly
visualized.

Any feedback will be greatly appreciated!

Taokai
Oct.9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061009/eda7a5b6/attachment.htm>


More information about the vtkusers mailing list