<DIV>hi,all</DIV>
<DIV>How do i read multifiles 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 loop these files? I have no idea.</DIV>
<DIV>Any suggestions will be very glad! Or just give me some hints of which VTK class to use.</DIV>
<DIV>Thanks!</DIV>
<DIV>*********************************************************************************</DIV>
<DIV>//access one tecplot file<BR> const char *fileName;<BR> vtkTecplotReader *tecR=vtkTecplotReader::New();<BR> fileName="C:/Program Files/VTK 5.6/mycode/Example01/fort151.plt";<BR> tecR->SetFileName(fileName);<BR> tecR->Update();</DIV>
<DIV> //read this file<BR> vtkMultiBlockDataSet *mbds =vtkMultiBlockDataSet::New ();<BR> mbds=tecR->GetOutput();</DIV>
<DIV> vtkUnstructuredGrid *ug=vtkUnstructuredGrid::SafeDownCast(mbds->GetBlock(0));<BR> ug->GetPointData()->SetActiveScalars("H"); //set H as the attribute data to show</DIV>
<DIV> // Now we'll look at it.<BR> vtkDataSetMapper *cubeMapper = vtkDataSetMapper::New();<BR> cubeMapper->SetInput(ug);<BR> vtkActor *cubeActor = vtkActor::New();<BR> cubeActor->SetMapper(cubeMapper);</DIV>
<DIV> vtkRenderer *renderer = vtkRenderer::New();<BR> renderer->AddActor(cubeActor);</DIV>
<DIV> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer(renderer);</DIV>
<DIV> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renWin);</DIV>
<DIV> renderer->AddActor(cubeActor);<BR> renderer->ResetCamera();</DIV>
<DIV> renWin->SetSize(500,500);</DIV>
<DIV> // interact with data<BR> renWin->Render();<BR> iren->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>