<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello, I want to read a vtkMultiBlockDataSet and append some more
blocks (vtkPolyData). How do I have to extract the blocks from the
reader and how can I add new blocks?<br>
<br>
<br>
<br>
the (pseudo) code looks like this. Please have a look at the line
with the red comment, the rest should be fine:<br>
<br>
<br>
vtkSmartPointer<vtkXMLMultiBlockDataReader> reader =
vtkSmartPointer<vtkXMLMultiBlockDataReader>::New();<br>
reader->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");{<br>
reader->Update();<br>
<br>
vtkSmartPointer<vtkPolyData> linePolyData =<br>
vtkSmartPointer<vtkPolyData>::New();<br>
/* add some vtkLine to linePolyData */<br>
<br>
vtkSmartPointer<vtkMultiBlockDataSet> multiBDS_read =
vtkSmartPointer<vtkMultiBlockDataSet>::New ();<br>
<font color="#ff0000"> multiBDS_read->SETBLOCKS(reader->GETBLOCKS());
// HOW CAN I TRANSFER THE BLOCKS FROM READER TO MULTIBDS_READER?</font><br>
multiBDS_read->(multiBDS->GetNumberOfBlocks(),linePolyData);
// append one more block<br>
<br>
vtkSmartPointer<vtkXMLMultiBlockDataWriter> writer =
vtkSmartPointer<vtkXMLMultiBlockDataWriter>::New();<br>
writer->SetFileName("vtkMultiBlockDataSetWriter_output.vtm");<br>
writer->SetInput(multiBDS_read);<br>
writer->Write();<br>
<br>
<br>
thanks<br>
s<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>