<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1434196967677_6903">Hello! I have a problem in programme vtk project with vs2010.</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr">Now I have a series .vtu files in a folder with the name like PART001, PART002, PART003 and so on. If I open this bunch of files in paraview, it shows a active view. Now with the class of vtuXMLUnstructuredGridReader, i am able to open a .vtu file in this folder and a static graphic shown in a window. But if i made a loop to read .vtu files files. it will read one .vtu at a time, generating one window with static graphic and then close this window, and open a new window to show the next graphic read from the next .vtu file. I want to know which class i should use to read all the .vtu files as a whole and generate an active view just like shown in the ParaView. The code I read one .vtu file is listed as follows. How should I change the code if I want to achieve my target.</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr"><br></div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr"><br></div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>>vtkSmartPointer<vtkXMLUnstructuredGridReader> reader = vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7432">>> </span>char fileName[128]; </div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7435">>> </span>sprintf(fileName,"G:/ParaviewFiles/ParaviewFiles/VTU/VTUinp.pvd");</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7439">>> </span>reader->SetFileName(fileName);<span style="white-space: pre;"> </span></div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7443">>> </span>vtkNew<vtkDataSetSurfaceFilter> surfaces;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;" id="yui_3_16_0_1_1434196967677_7544"> </span>surfaces->SetInputConnection(reader->GetOutputPort());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7459">>> </span>vtkNew<vtkPolyDataMapper> mapper;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7468">>> </span>mapper->SetInputConnection(surfaces->GetOutputPort());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7471">>> </span>vtkNew<vtkActor> actor;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7474">>> </span>actor->SetMapper(mapper.GetPointer());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7478">>> </span>vtkNew<vtkRenderer> renderer;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7482">>> </span>renderer->AddActor(actor.GetPointer());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;" id="yui_3_16_0_1_1434196967677_7565"> </span>renderer->SetBackground(0,0,0);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;" id="yui_3_16_0_1_1434196967677_7551"> </span>vtkNew<vtkRenderWindow> renwin;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;" id="yui_3_16_0_1_1434196967677_7550"> </span>renwin->SetMultiSamples(0);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7501">>> </span>renwin->AddRenderer(renderer.GetPointer());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>>renwin->SetSize(500, 500);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7508">>> </span>vtkNew<vtkRenderWindowInteractor> iren;</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7507">>> </span>iren->SetRenderWindow(renwin.GetPointer());</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7514">>> </span>iren->Initialize();</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7518">>> </span>renderer->ResetCamera();</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7521">>> </span>vtkCamera *camera = renderer->GetActiveCamera();</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;" id="yui_3_16_0_1_1434196967677_7564"> </span>camera->Elevation(-90);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7527">>> </span>camera->SetViewUp(0.0, 0.0, 0.0);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style="">>><span class="" style="white-space: pre;"> </span>camera->Azimuth(0);</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7537">>> </span>renwin->Render();</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><span class="" style="white-space:pre" id="yui_3_16_0_1_1434196967677_7541">>> </span>int retVal = vtkRegressionTestImage( renwin.GetPointer() );</div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr" class="" style=""><br></div><div id="yui_3_16_0_1_1434196967677_6903" dir="ltr">Thanks very much!</div></div></body></html>