[vtkusers] How to produce movie file?
rakesh patil
prakeshofficial at gmail.com
Thu Jan 12 07:39:11 EST 2012
Dear VTK Users,
Please pardon me for re-posting the question. How do I produce the movie
file using vtkAVIWriter? I do have written a code and it produces animation
file without any problem. When I wanted to present this animation in
powerpoint, it so happened that, full animation played without any problem.
But what I observed was that at the beginning of the video and at the end
of the video, black screen is displayed. Is this an expected behavior of
vtkAVIWriter? If not how can I remove the black screen?
Below is the code I have used.
vtkWindowToImageFilter *windowToImage = vtkWindowToImageFilter::New();
windowToImage->SetInput(pRenderWindow );
windowToImage->SetInputBufferTypeToRGBA();
vtkAVIWriter *avw = vtkAVIWriter::New();
avw->SetInputConnection(windowToImage->GetOutputPort());
avw->SetFileName("animation.avi");
avw->SetQuality(2);
avw->SetRate((int)srate);
avw->Start();
double tIter = startIndex;
while(tIter <= endIndex)
{
/* Code to Display Results (Contours and/or vectors) */
windowToImage->Modified();
avw->Write();
/* Code to increment the counter */
tIter += timeStep;
}
avw->End();
avw->Delete();
windowToImage->Delete();
Urgent suggestions/help required.
Thanks in advance
Regards
Rakesh Patil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120112/ca1d8730/attachment.htm>
More information about the vtkusers
mailing list