@@ -0,0 +1,2932 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindow;%0Aimport vtk.vtkRenderWindowInteractor;%0Aimport vtk.vtkRenderer;%0Aimport vtk.vtkImageSinusoidSource;%0Aimport vtk.vtkImageNormalize;%0Aimport vtk.vtkImageCast;%0Aimport vtk.vtkImageActor;%0A%0Apublic class ImageNormalize %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    //  Create an image%0A    vtkImageSinusoidSource source = new vtkImageSinusoidSource();%0A    source.Update();%0A%0A    vtkImageNormalize normalizeFilter = new vtkImageNormalize();%0A%0A    normalizeFilter.SetInputConnection(source.GetOutputPort());%0A    normalizeFilter.Update();%0A    %0A    vtkImageCast inputCastFilter = new vtkImageCast();%0A    inputCastFilter.SetInputConnection(source.GetOutputPort());%0A    inputCastFilter.SetOutputScalarTypeToUnsignedChar();%0A    inputCastFilter.Update();%0A%0A    vtkImageCast normalizeCastFilter = new vtkImageCast();%0A    normalizeCastFilter.SetInputConnection(normalizeFilter.GetOutputPort());%0A    normalizeCastFilter.SetOutputScalarTypeToUnsignedChar();%0A    normalizeCastFilter.Update();%0A    %0A    //  Create actors%0A    vtkImageActor inputActor = new vtkImageActor();%0A    inputActor.GetMapper().SetInputConnection(inputCastFilter.GetOutputPort());%0A%0A    vtkImageActor normalizedActor = new vtkImageActor();%0A    normalizedActor.GetMapper().SetInputConnection(normalizeCastFilter.GetOutputPort());%0A    %0A    //  Create the render window and interactor.%0A    vtkRenderWindow renWin = new vtkRenderWindow();%0A    vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();%0A    iren.SetRenderWindow(renWin);%0A    %0A    //  Define viewport ranges%0A    // (xmin, ymin, xmax, ymax)%0A    double leftViewport%5B%5D = new double%5B%5D %7B0.0, 0.0, 0.5, 1.0%7D;%0A    double rightViewport%5B%5D = new double%5B%5D %7B0.5, 0.0, 1.0, 1.0%7D;%0A    %0A    //  Setup both renderers%0A    vtkRenderer leftRenderer = new vtkRenderer();%0A    renWin.AddRenderer(leftRenderer);%0A    leftRenderer.SetViewport(leftViewport);%0A    leftRenderer.SetBackground(.6, .5, .4);%0A%0A    vtkRenderer rightRenderer = new vtkRenderer();%0A    renWin.AddRenderer(rightRenderer);%0A    rightRenderer.SetViewport(rightViewport);%0A    rightRenderer.SetBackground(.4, .5, .6);%0A    %0A    leftRenderer.AddActor(inputActor);%0A    rightRenderer.AddActor(normalizedActor);%0A%0A    leftRenderer.ResetCamera();%0A    rightRenderer.ResetCamera();%0A    %0A    renWin.SetSize(600,300);%0A    renWin.Render();%0A   %0A    iren.Initialize();%0A    iren.Start();%0A  %7D%0A%7D%0A

Create ImageNormalize.java