@@ -0,0 +1,1504 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindowInteractor;%0Aimport vtk.vtkJPEGReader;%0Aimport vtk.vtkImageViewer2;%0A%0Apublic class JPEGReader%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%09%0A  public static void main(String args%5B%5D) %0A  %7B%0A    //parse command line arguments%0A    if (args.length != 1) %0A    %7B%0A      System.err.println(%22Usage: java -classpath ... Filename(.jpg) e.g Pileated.jpg %22);%0A      return;%0A    %7D%0A   %0A    String inputFilename = args%5B0%5D;%0A    %0A    //Read the image%0A    vtkJPEGReader jpegReader = new vtkJPEGReader();%0A    jpegReader.SetFileName (inputFilename);%0A%0A    // Visualize%0A    vtkImageViewer2 imageViewer = new vtkImageViewer2();%0A    imageViewer.SetInputConnection( jpegReader.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 JPEGReader.java