[vtkusers] vtkImagedata and vtkRenderWindow

David Gobbi dgobbi at atamai.com
Tue Jan 31 08:11:45 EST 2006


If you are using vtkImageActor or vtkImageViewer2 to display the image, then the resize should be
automatic.  Generally these are the two classes
you should use for image display.


If you are using vtkImageMapper or the old vtkImageViewer, then you need
to add an observer for the "StartEvent" of the renderer.  This event is generated immediately
before the renderer updates the pipeline and paints the window.  In the callback for the observer,
you have to resize the
image using a resample filter based on the width and height of the
renderer.

 - David


--- Bruno Marques <correia.bruno at gmail.com> wrote:

> I would like to display an image in a VTK render window and i would like the
> image to adapt its size to the render window whenever this is resized. Is it
> possible?
> > _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list