<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
i think found the solution:<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->ShallowCopy(reader->GetOutput());</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>
<br>
<br>
<div class="moz-cite-prefix">On 27.10.2014 14:57, Tanaka Simon
wrote:<br>
</div>
<blockquote cite="mid:544E4F58.8030805@gmx.ch" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
</body>
</html>