@@ -0,0 +1,2952 @@
+import vtk.vtkNamedColors;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkRenderWindow;%0Aimport vtk.vtkRenderWindowInteractor;%0Aimport vtk.vtkRenderer;%0Aimport vtk.vtkSphereSource;%0Aimport vtk.vtkPolyDataMapper;%0Aimport vtk.vtkActor;%0Aimport vtk.vtkImageCanvasSource2D;%0Aimport vtk.vtkLogoRepresentation;%0Aimport vtk.vtkLogoWidget;%0A  %0Apublic class LogoWidget%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    vtkNamedColors colors = new vtkNamedColors(); %0A%0A    //Circle Actor Color%0A    double Circlecolor%5B%5D = new double%5B4%5D; %0A    colors.GetColor(%22Mint%22, Circlecolor);%0A    %0A    //Renderer Background Color%0A    double Bgcolor%5B%5D = new double%5B4%5D; %0A    colors.GetColor(%22SteelBlue%22, Bgcolor);%0A%0A    //A sphere%0A    vtkSphereSource sphereSource = new vtkSphereSource();%0A    sphereSource.SetCenter(0.0, 0.0, 0.0);%0A    sphereSource.SetRadius(4.0);%0A    sphereSource.SetPhiResolution(4);%0A    sphereSource.SetThetaResolution(8);%0A    sphereSource.Update();%0A%0A    vtkPolyDataMapper mapper = new vtkPolyDataMapper();%0A    mapper.SetInputConnection(sphereSource.GetOutputPort());%0A%0A    vtkActor actor = new vtkActor();%0A    actor.SetMapper(mapper);%0A%0A    //Create the renderer, render window and interactor.%0A    vtkRenderer ren = new vtkRenderer();%0A    vtkRenderWindow renWin = new vtkRenderWindow();%0A    renWin.AddRenderer(ren);%0A    vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();%0A    iren.SetRenderWindow(renWin);%0A%0A    //Create an image%0A    vtkImageCanvasSource2D drawing = new vtkImageCanvasSource2D();%0A    drawing.SetScalarTypeToUnsignedChar();%0A    drawing.SetNumberOfScalarComponents(3);%0A    drawing.SetExtent(0,200,0,200,0,0);%0A%0A    //Clear the image%0A    drawing.SetDrawColor(255, 127, 100);%0A    drawing.FillBox(0,200,0,200);%0A    drawing.SetDrawColor(Circlecolor);%0A    drawing.DrawCircle(100, 100, 50);%0A    drawing.Update();%0A%0A    vtkLogoRepresentation logoRepresentation = new vtkLogoRepresentation();%0A    logoRepresentation.SetImage(drawing.GetOutput());%0A    logoRepresentation.SetPosition(0,0);%0A    logoRepresentation.SetPosition2(.4, .4);%0A    logoRepresentation.GetImageProperty().SetOpacity(.7);%0A%0A    vtkLogoWidget logoWidget = new vtkLogoWidget();%0A    logoWidget.SetInteractor(iren);%0A    logoWidget.SetRepresentation(logoRepresentation);%0A    logoWidget.On();%0A%0A    ren.SetBackground(Bgcolor);%0A    ren.AddActor(actor);%0A    renWin.SetSize(300,300);%0A    renWin.Render();%0A%0A    iren.Initialize();%0A    iren.Start();%0A  %7D%0A%7D%0A

Create LogoWidget.java