[vtkusers] vtkAVIWriter rendering and speed problems
    William E Lucarell 
    welucarell at equityeng.com
       
    Wed Feb 27 14:42:16 EST 2008
    
    
  
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();
        filter.SetInput(renWin.GetRenderWindow());
        writerAVI = new vtkAVIWriter();
        writerAVI.SetInput(filter.GetOutput());
        writerAVI.SetFileName("c://movie.avi");
        writerAVI.Start();
        
        // Write each frame of the movie
        for (int i = 0; i < 10; i++) {
            TestMesh.GetPointData().SetScalars(scalars[i]);
            renWin.GetRenderWindow().Render();
            filter.Update();
            writerAVI.Write();
        }
        
        // Close the AVI writer
        writerAVI.End();
//        TestMesh.GetPointData().SetScalars(scalars[0]);
        renWin.Render();
        
    }
 
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/06a02397/attachment.htm>
    
    
More information about the vtkusers
mailing list