@@ -0,0 +1,1334 @@
+import vtk.vtkImageCanvasSource2D;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkAVIWriter;%0A%0Apublic class AVI %0A%7B%0A  //-----------------------------------------------------------------%0A  // Load VTK library and print which library was not properly loaded%0A  static %0A  %7B%0A    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %0A    %7B%0A      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %0A      %7B%0A        if (!lib.IsLoaded()) %0A        %7B%0A          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A        %7D%0A      %7D%0A    %7D%0A    vtkNativeLibrary.DisableOutputWindow(null);%0A  %7D%0A  // ----------------------------------------------------------------%0A  %0A  public static void main(String args%5B%5D) %0A  %7B%0A%0A    vtkImageCanvasSource2D Source = new vtkImageCanvasSource2D();%0A    Source.SetScalarTypeToUnsignedChar();%0A    Source.SetNumberOfScalarComponents(3);%0A    Source.SetExtent(0, 100, 0, 100, 0, 0);%0A%0A    vtkAVIWriter Writer = new vtkAVIWriter();%0A    Writer.SetInputConnection(Source.GetOutputPort());%0A    Writer.SetFileName(%22test.avi%22);%0A    Writer.Start();%0A%0A    for(int i = 0; i %3C 100; i++)%0A    %7B%0A      %0A      Source.SetDrawColor(0, 0, 0, 1);%0A      Source.FillBox(0, 100, 0, 100);%0A      Source.SetDrawColor(255, 0, 0, 1);%0A      Source.FillBox(i, 20, 10, 20);%0A      Source.Update();%0A      Writer.Write();%0A      %0A    %7D%0A    Writer.End();%0A  %7D%0A%7D%0A

Create AVI.java