@@ -0,0 +1,1426 @@
+import vtk.vtkImageViewer2;%0Aimport vtk.vtkPNGReader;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindowInteractor;%0A%0Apublic class PNGReader %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    //parse command line arguments%0A    if (args.length != 1) %7B%0A      System.err.println(%22Usage: java -classpath ... Filename(.png) e.g Test.png%22);%0A      return;%0A    %7D%0A    //  Read the image%0A    vtkPNGReader reader = new vtkPNGReader();%0A    reader.SetFileName(args%5B0%5D);%0A    %0A    //  Visualize%0A    vtkImageViewer2 imageViewer = new vtkImageViewer2();%0A    imageViewer.SetInputConnection(reader.GetOutputPort());%0A    vtkRenderWindowInteractor renderWindowInteractor = new vtkRenderWindowInteractor();%0A    imageViewer.SetupInteractor(renderWindowInteractor);%0A    imageViewer.Render();%0A    imageViewer.GetRenderer().ResetCamera();%0A    imageViewer.Render();%0A%0A    renderWindowInteractor.Start();%0A  %7D%0A%7D%0A

Create PNGReader.java