<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi Vtkusers,<BR><BR>I'&nbsp;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>&nbsp;</DIV>
<DIV><FONT size=2>I'm using the <FONT size=2>vtkJPEGReader to read the&nbsp;stack of jpeg images.</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV>vtkMPEG2Writer *w = vtkMPEG2Writer::New();</DIV>
<DIV>&nbsp;</DIV><FONT size=2>
<DIV>w-&gt;SetInputConnection(reader-&gt;GetOutputPort());</DIV>
<DIV>&nbsp;</DIV>
<DIV>w-&gt;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>&nbsp;</DIV>
<DIV>w-&gt;Start();</DIV>
<DIV>&nbsp;</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 &lt;=30 ;cpt ++ )</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader-&gt;Update();</DIV>
<DIV>&nbsp;</DIV></FONT><FONT size=2>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w-&gt;Write();</FONT><FONT size=2></DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>w-&gt;End(); </DIV>
<DIV>//****************************************************</FONT><FONT size=2></DIV></FONT>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></FONT></FONT></td></tr></table><br>