[vtkusers] Data conversion and vtkXMLPPolyDataWriter - vtkXMLPPolyDataReader
Daniele Bianchini
daniele.bianchini at menci.com
Thu Jan 25 05:11:45 EST 2007
Hello,
I have to convert very large data to one of VTK file formats (15 - 20
million points). Source data are in ASCII file format.
I tried to use VTP file format but the software crashes because VTK classes
allocate so many memory.
For each point in source file I add:
* a point in a vtkPoints class using InsertNextPoint function.
* a cell with only one point in a vtkCellArray using InsertNextCell
function.
* an RGB value in a vtkUnsignedCharArray class using InsertNextTuple3
function.
* an Intensity value in a vtkFloatArray class using InsertNextTuple1
function.
So I want to write my data in some different VTP files and merging them
using a PVTP file.
I tried to save the PVTP as:
vtkXMLPPolyDataWriter* pXMLPPolyDataWriter = vtkXMLPPolyDataWriter::New();
pXMLPPolyDataWriter->SetFileName(pvtpFilePath);
pXMLPPolyDataWriter->SetInput(pPolyData);
pXMLPPolyDataWriter->SetNumberOfPieces(nFiles);
pXMLPPolyDataWriter->SetDataModeToBinary();
pXMLPPolyDataWriter->Write();
pXMLPPolyDataWriter->Delete();
where pPolyData is a very small vtkPolyData used only to save the PVTP.
Then I saved the VTP files with the correct names, but when I reopen the
PVTP file with ParaView I see that the first part (first VTP file) is
correct but the others not.
Can someone help me?
Daniele.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070125/55fd4943/attachment-0001.htm>
More information about the vtkusers
mailing list