[vtkusers] vtkAVIWriter rendering and speed problems
William E Lucarell
welucarell at equityeng.com
Wed Feb 27 13:40:28 EST 2008
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/c0ce2228/attachment.htm>
More information about the vtkusers
mailing list