I have a 50 million triangle PLY File written to disk that I would like to convert to a Parallel VTP (PVTP) file for multithreaded rendering with ParaView. I tried simply connecting a vtkPLYReader to a vtkXMLPPolyDataWriter, but it doesn't seem to have worked. it's been running for 45 minutes and I have a "city_0.vtp" going to disk, slowly.
<br><br>Is this the correct method, or am I missing something?<br><br>=== Source <br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">#include <stdio.h></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#include <vtkPLYReader.h></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#include <vtkXMLPPolyDataWriter.h
></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">int main (int argc, char *argv[]) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
printf("Reading \"%s\"...\n", argv[1]);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> vtkPLYReader *reader = vtkPLYReader::New();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> reader->SetFileName(argv[1]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
reader->Update();</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
printf("Writing \"%s\"...\n", argv[2]);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> vtkXMLPPolyDataWriter *writer = vtkXMLPPolyDataWriter::New();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetInput(reader->GetOutput());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
writer->SetFileName(argv[2]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetNumberOfPieces(24);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->WriteSummaryFileOn();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->Write();</span>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br></div>====== End source<br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS
<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>