[vtkusers] Writing MultiBlock datasets

Renato N. Elias rnelias at nacad.ufrj.br
Wed Apr 16 09:10:27 EDT 2008


Hi folks,

does anybody could give me a hand in writing a vtkMultiBlockDataSet. I 
saw there's a  vtkXMLCompositeDataWriter 
<http://www.vtk.org/doc/nightly/html/classvtkXMLCompositeDataWriter.html#f2b96e41718dcb0bc93db39ad82675ad> 
and a derived vtkXMLMultiBlockDataWriter 
<http://www.vtk.org/doc/nightly/html/classvtkXMLMultiBlockDataWriter.html> 
the problem is that I can't do something like:

// creating a multiblock object
vtkMultiBlockDataSet* mb= vtkMultiBlockDataSet::New();

// Assign some stuffs
mb->SetBlock(0, ???)
mb->SetBlock(1, ???)
mb->SetBlock(2, ???)

// Create the writer
vtkXMLCompositeDataWriter* mbw = vtkXMLCompositeDataWriter::New();

// Set the filename
mbw->SetFileName("test.vtm");

// Setting up the connection <--- HERE'S MY DOUBT
mbw->SetInputConnection(mb->GetOutput());

// Write the data
mbw->Write();

since vtkMultiBlockDataSet does not have a "GetOutput" method.

Does anyone could supply an example?

Thanks

Renato.



More information about the vtkusers mailing list