<DIV>hi,all</DIV>
<DIV>How do i read multifiles&nbsp;and animate them. these files share the same topological structure but different attribute data. I just want to read them and finally animated them.</DIV>
<DIV>the code below just read one file. Must I build up a "for ....next " structure to&nbsp;loop these files? I have no idea.</DIV>
<DIV>Any suggestions will be very glad! Or just give me some hints of&nbsp;which VTK class to use.</DIV>
<DIV>Thanks!</DIV>
<DIV>*********************************************************************************</DIV>
<DIV>//access&nbsp;one tecplot file<BR>&nbsp;const char *fileName;<BR>&nbsp;vtkTecplotReader *tecR=vtkTecplotReader::New();<BR>&nbsp;fileName="C:/Program Files/VTK 5.6/mycode/Example01/fort151.plt";<BR>&nbsp;tecR-&gt;SetFileName(fileName);<BR>&nbsp;tecR-&gt;Update();</DIV>
<DIV>&nbsp;//read this file<BR>&nbsp;vtkMultiBlockDataSet *mbds =vtkMultiBlockDataSet::New ();<BR>&nbsp;mbds=tecR-&gt;GetOutput();</DIV>
<DIV>&nbsp;vtkUnstructuredGrid *ug=vtkUnstructuredGrid::SafeDownCast(mbds-&gt;GetBlock(0));<BR>&nbsp;ug-&gt;GetPointData()-&gt;SetActiveScalars("H"); //set H as the attribute data to show</DIV>
<DIV>&nbsp;// Now we'll look at it.<BR>&nbsp;vtkDataSetMapper *cubeMapper = vtkDataSetMapper::New();<BR>&nbsp;&nbsp; cubeMapper-&gt;SetInput(ug);<BR>&nbsp;vtkActor *cubeActor = vtkActor::New();<BR>&nbsp;&nbsp; cubeActor-&gt;SetMapper(cubeMapper);</DIV>
<DIV>&nbsp;vtkRenderer *renderer = vtkRenderer::New();<BR>&nbsp;renderer-&gt;AddActor(cubeActor);</DIV>
<DIV>&nbsp;vtkRenderWindow *renWin = vtkRenderWindow::New();<BR>&nbsp;renWin-&gt;AddRenderer(renderer);</DIV>
<DIV>&nbsp;vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR>&nbsp;iren-&gt;SetRenderWindow(renWin);</DIV>
<DIV>&nbsp;renderer-&gt;AddActor(cubeActor);<BR>&nbsp;&nbsp; renderer-&gt;ResetCamera();</DIV>
<DIV>&nbsp;renWin-&gt;SetSize(500,500);</DIV>
<DIV>&nbsp;// interact with data<BR>&nbsp;renWin-&gt;Render();<BR>&nbsp;iren-&gt;Start();</DIV>
<DIV>*************************************************************************************</DIV>
<P>reece<BR><BR><SPAN title="neteasefooter"><SPAN id="netease_mail_footer">
<HR>
<A href="http://help.163.com/10/1108/18/6L03I4G500753VB8.html" target="_blank">网易163/126邮箱百分百兼容iphone ipad邮件收发</A> </SPAN></SPAN></P><br><br><span title="neteasefooter"><span id="netease_mail_footer"><hr/>
<a href="http://help.163.com/10/1108/18/6L03I4G500753VB8.html" target="_blank">网易163/126邮箱百分百兼容iphone ipad邮件收发</a>
</span></span>