[vtkusers] Writing MultiBlock datasets

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


yes, in fact, it was my first try. The problem is that I don't know how 
to get the output from vtkMultiBlockDataSet. How should 
classvtkXMLCompositeDataWriter and vtkMultiBlockDataSet be connected?

Renato.
>
>
> Have you tried calling mbw->SetInput(mb)?
>
> - Amy
>
> Renato N. Elias wrote:
>> 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.
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at: 
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>




More information about the vtkusers mailing list