@@ -0,0 +1,1551 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkImageCanvasSource2D;%0Aimport vtk.vtkOggTheoraWriter;%0A%0A    %0Apublic class OggTheora %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    String fileName = %22test.avi%22;%0A    for(int i = 0; i %3C args.length; ++i)%0A    %7B%0A      switch (i) %0A      %7B%0A        case 0:%0A        fileName = args%5Bi%5D;%0A        break;%0A      %7D%0A    %7D%0A%0A    vtkImageCanvasSource2D source = new vtkImageCanvasSource2D();%0A    source.SetScalarTypeToUnsignedChar();%0A    source.SetNumberOfScalarComponents(3);%0A    source.SetExtent(0, 100, 0, 100, 0, 0);%0A%0A    vtkOggTheoraWriter writer = new vtkOggTheoraWriter();%0A%0A    writer.SetInputConnection(source.GetOutputPort());%0A    writer.SetFileName(fileName);%0A    writer.Start();%0A%0A    for(int i = 0; i %3C 100; i++)%0A    %7B%0A      source.SetDrawColor(0,0,0,1); //black%0A      source.FillBox(0, 100, 0, 100); //clear image%0A      source.SetDrawColor(255,0,0,1); //red%0A      source.FillBox(i, 20, 10, 20);%0A      source.Update();%0A      writer.Write();%0A    %7D%0A    writer.End();%0A  %7D%0A%7D%0A

Create OggTheora.java