[vtkusers] Streaming vtkPolyData

Mathieu Westphal mathieu.westphal at gmail.com
Tue Oct 9 09:55:02 EDT 2012


Hello.

It appears that i cannot make Streaming work with a simple example :


void testStreamingPD()
{
     vtkSmartPointer<vtkXMLPolyDataReader> vtkxmlreader = 
vtkSmartPointer<vtkXMLPolyDataReader>::New();
     vtkxmlreader->SetFileName("sp.vtp");
     vtkxmlreader->ReleaseDataFlagOn();

     vtkSmartPointer<vtkXMLPolyDataWriter> writer2 = 
vtkSmartPointer<vtkXMLPolyDataWriter>::New();
writer2->SetInputConnection(vtkxmlreader->GetOutputPort());
     writer2->SetFileName("sp2.vtp");
     writer2->SetNumberOfPieces(8);
     writer2->Write();

}

This code works, but not in streaming.

althoug, with a structuredGrid, it work well in streaming:

void testStreamingSG()
{
     vtkSmartPointer<vtkXMLStructuredGridReader> vtkxmlreader = 
vtkSmartPointer<vtkXMLStructuredGridReader>::New();
     vtkxmlreader->SetFileName("multicomb_0.vts");
     vtkxmlreader->ReleaseDataFlagOn();

     vtkSmartPointer<vtkXMLStructuredGridWriter> writer2 = 
vtkSmartPointer<vtkXMLStructuredGridWriter>::New();
writer2->SetInputConnection(vtkxmlreader->GetOutputPort());
     writer2->SetFileName("m2.vts");
     writer2->SetNumberOfPieces(8);
     writer2->Write();

}

What do i forgot?

Thanks

Mathieu






More information about the vtkusers mailing list