[vtkusers] Problems with vtkAVIWriter

Christina Lacalli christina.lacalli at igd.fraunhofer.de
Mon Feb 11 03:39:32 EST 2008


Hello,

I want to create a movie using the vtkAVIWriter.
I have a set of vtkImageData stored in a buffer 
(std::vector<vtkImageData*>) and each representing a frame at time t.
I tried to use vtkAVIWriter as it is used in "vtkAVIWriter (Tests)" but 
it doesn't work correctly. I just get one static image.
What I did is:

m_pAVIWriter = vtkAVIWriter::New();
m_pAVIWriter->SetInput(m_pBuffer[0]);
m_pAVIWriter->SetFileName("movie.avi");
m_pAVIWriter->Start();

for (int i = 0; i < m_pBuffer.size(); i++){
   m_pAVIWriter->SetInput(m_pBuffer[i]);
   m_pAVIWriter->Write();
}
m_pAVIWriter->End();

Any suggestions what is wrong here?

Thanks in advance,
Christina



More information about the vtkusers mailing list