<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi Vtkusers,<BR><BR>I' m trying to use <FONT size=2>vtkMPEG2Writer to produce un Mpeg file from a stack of JPEG File.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I'm using the <FONT size=2>vtkJPEGReader to read the stack of jpeg images.</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=2>My problem is that the output MPEG file contains only the first image. </FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=2>Bellow the source code :</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2><BR><FONT size=2>//**************************************</DIV>
<DIV>vtkJPEGReader *reader = vtkJPEGReader::New( );</DIV>
<DIV> </DIV>
<DIV>vtkMPEG2Writer *w = vtkMPEG2Writer::New();</DIV>
<DIV> </DIV><FONT size=2>
<DIV>w->SetInputConnection(reader->GetOutputPort());</DIV>
<DIV> </DIV>
<DIV>w->SetFileName(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"TestMovieWriter.mpg"</FONT></FONT><FONT size=2>);</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2> </DIV>
<DIV>w->Start();</DIV>
<DIV> </DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>for</FONT></FONT><FONT size=2> ( </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> cpt = 1; cpt <=30 ;cpt ++ )</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT size=2> reader->SetFileName(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"test"</FONT></FONT><FONT size=2>+QString::number(cpt)+</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>".jpg"</FONT></FONT><FONT size=2>);</DIV>
<DIV> </DIV>
<DIV> reader->Update();</DIV>
<DIV> </DIV></FONT><FONT size=2>
<DIV> w->Write();</FONT><FONT size=2></DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>w->End(); </DIV>
<DIV>//****************************************************</FONT><FONT size=2></DIV></FONT>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thank you</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></FONT></FONT></td></tr></table><br>