[vtkusers] How to produce movie file?
Alex Malyushytskyy
alexmalvtk at gmail.com
Wed Jan 18 19:17:16 EST 2012
Have you checked avi you made with avi editing software ?
Does it have pure black frames at the beginning and end?
If not problem is in powerpoint.
Alex
On Thu, Jan 12, 2012 at 4:39 AM, rakesh patil <prakeshofficial at gmail.com> wrote:
> 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
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list