[vtkusers] vtkAVIWriter rendering and speed problems

William E Lucarell welucarell at equityeng.com
Wed Feb 27 15:31:48 EST 2008

Yay, found the other answer but I figured I'd post it if anyone needed the


For rendering, the Update() method on the vtkWindowToImageFilter doesn't
work.  Instead, filter.Update() should be filter.Modified().  Then the AVI
will render each frame.





From: William E Lucarell [mailto:welucarell at equityeng.com] 
Sent: Wednesday, February 27, 2008 2:42 PM
To: 'William E Lucarell'; vtkusers at vtk.org
Subject: RE: [vtkusers] vtkAVIWriter rendering and speed problems


I found out how to slow the framers per second on my own.  Just call
writer.Write() in an n-count for loop.


Example:  for (int k = 0; k < 15; k++) writer.Write();


The movie, unlike the render window, still doesn't update the image based on
the change in scalars, though.


From: vtkusers-bounces+welucarell=equityeng.com at vtk.org
[mailto:vtkusers-bounces+welucarell=equityeng.com at vtk.org] On Behalf Of
William E Lucarell
Sent: Wednesday, February 27, 2008 1:40 PM
To: vtkusers at vtk.org
Subject: [vtkusers] vtkAVIWriter rendering and speed problems


I am using vtkAVIWriter to generate an AVI movie in Java.  However, there
are two problems:


1)      I can't adjust the speed in frames per second so that every 200-500
milliseconds, the frame will change.

2)      Even though I change the scalars and update the window to image
filter, the image will not change colors based on the scalar changes.


Below is a code snippet:


    public void createAVI () {


        // Prepare the filter and AVI writer

        filter = new vtkWindowToImageFilter();


        writerAVI = new vtkAVIWriter();





        // Write each frame of the movie

        for (int i = 0; i < 10; i++) {







        // Close the AVI writer


//        TestMesh.GetPointData().SetScalars(scalars[0]);





What am I missing? Thanks for your help in advance.


Bill Lucarell



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080227/70a5b1ba/attachment.htm>

More information about the vtkusers mailing list