[vtkusers] Using vtkBMPReader to cycle through frames/textures

Pasi Kettunen psk1 at student.cs.ucc.ie
Tue Apr 26 11:43:28 EDT 2005


Hi,

I am trying to cycle through a set of images using a vtkBMPReader. Is it 
possible to 
change vtkBMPReader's input (filename) after starting the event loop?

For example, if I use something like the code below, I can not insert
myBMPReader->SetFileName ("frame2.bmp");
after the iren->start();

I need to be able to keep changing the frames after the renderer has started 
displaying 
things on the screen. How could I achieve this? Any thoughts would be greatly 
appreciated.

Regards,

Pasi



	myBMPReader->SetFileName ("frame1.bmp");

vtkImageActor *myImageActor = vtkImageActor::New();
    myImageActor->SetInput(myBMPReader->GetOutput());
 aRenderer->AddActor(myImageActor);

  //unrelated parts of code omitted

 aRenderer->SetBackground(0.5,0.5,0.5);
 renWin->SetSize(800, 600);
 iren->Initialize();
 iren->Start(); 




More information about the vtkusers mailing list