[vtkusers] How to handle windows in Java???

J.A. Lee jeff at cdnorthamerica.com
Mon Dec 31 08:43:17 EST 2001


Jason,
If you are using vtk 4.0 then you will find a java class called 
vtkPanel.java somewhere in the distribution (I think it is in 
Wrapping/Java/).  vtkPanel has hooks into the native windowing system 
which allows the scene to be drawn in an awt canvas.  There should also 
be another class called SimpleVTK.java which demonstrates how to use 
vtkPanel with some other swing components.  vtkImageViewer is a 
convenience class to display 2d images.  If you want to do more than 
just display images, you should start with the vtkPanel class and extend it.
-Jeff

Rodrigues, Jason (MED) wrote:

>What are the window handlers for vtkImageViewer?
>
>The Renderer would open a window, but the window would show the cursor state
>busy. As I couldnt trace a vtkImageHandler, I create a vtkRenderWIndow and
>add vtkRenderWIndowInteractor this would solve the problem of refreshing but
>that is not the solution as there is no direct handling of the
>vtkImageVIewer WIndow. CAn anybody suggest me a better solution?
>
>
>vtkImageViewer viewerColor = new vtkImageViewer();
>                        viewerColor.SetInput(imagedata);
>		viewerColor.SetZSlice(1);
>		viewerColor.SetColorWindow(400);
>		viewerColor.SetColorLevel(200);
>                        viewerColor.Render();
>	
>/* Here imagedata is a vtkImageDataObject */
>    /* Following would add a handler but certainly not for vtkImageViewer */
>   vtkRenderWindow renWin = new vtkRenderWindow();
>         renWin.AddRenderer(ren);
>         renWin.SetSize(600,600);
>
>   vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();
>         iren.SetRenderWindow(renWin);
>         iren.Initialize();
>         iren.Start();
>   
>
>
>
>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
>ADDRESSEE and may contain confidential and privileged information.
>If the reader of this message is not the intended recipient,
>you are notified that any dissemination, distribution or copy of this 
>communication is strictly Prohibited. 
>If you have received this message by error, please notify us 
>immediately, return the original mail to the sender and delete the 
>message from your system."
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>





More information about the vtkusers mailing list