[vtkusers] Problem with vtkPanel

Antoine Boivin a.boivin at m2m-ndt.com
Wed Apr 27 11:12:08 EDT 2005


Hi vtk users!

I use vtk with Java and I use a vtkPanel.
In the renderer of this vtkPanel I insert a surface with a texture.
In an other thread, I update this texture every time.
This program run correctly with a good frame rate 
but some minutes ago, the surface disappear of the view.
I notice an increase of the memory use by the program 
when the function "Render" of the vtkPanel are call.
That is the problem?

I don't understand what occurs and why the texture disappear?

This is the source of my Thread :

public class UpdateImage extends Thread 
{
  
  private view3D view; //view3D extends vtkPanel
  public boolean running=true;
  public boolean visu=true;
  
  public UpdateImage(View3D _view)
  {
    view = _view;
  }
  
  public void run()
  {      
    try
    { 
      while(running)
      {
          for (int isurf = 0; isurf<vue.getSurfaces().size(); isurf++)
          {
            ((Surface)view.getSurfaces().get(isurf)).updateTabImage();
          }
          SwingUtilities.invokeAndWait(new Runnable()
          {
            public void run() 
            {
              view.Render();
            }
          });
      }
    }
    catch (Exception e){
      System.out.println("Exception="+e);
    }
  }
}


Thanks for your help!

Antoine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050427/9d023172/attachment.htm>


More information about the vtkusers mailing list