[vtkusers] Zooming the vtkImageViewer

Brian Alexander Todd bat5 at po.cwru.edu
Thu Jun 8 11:13:46 EDT 2000


The main advantage that I have had in using vtkRenderWindow to
view images as textures on a plane is that I only have one 
vtkWindow class to deal with in my application.  This makes my
life a lot easier.

I haven't noticed any performance or quality difference between 
viewing a 512x512 image textured onto a plane in vtkRenderWindow 
versus using vtkImageWindow.  I haven't looked that hard either 
but when I originally asked about these issues, David Gobbi replied:

[... snip]
As long as your graphics card can handle 512x512 textures (most can),
there is no performance advantage to using the vtkImageWindow.

On just about any 3D accelerated graphics card, uploading textures
is just as fast as pasting an image of the same size.  Add to this
the fact that zooming and interpolation are nearly free with
accelerated texture mapping, while they are quite expensive if done 
by the CPU.

The examples to check are TPlane.tcl, resampledTexture.tcl, and
contrib/TextureReslice.tcl.  (Compare the latter to TextureReslice.py
to see why Python is a much better language for this stuff than
Tcl is ;)
[unsnip ...]

Perhaps, I would notice a difference with larger images?

Just my $0.02,
Brian




At 05:41 AM 4/11/00 +0300, you wrote:
>
>
>It is much slower, and the quality of the final image is poorer .
>Using vkRenderWindow instead of  vtkImageWindow is 2-4 times slower .
>
>
>Brian Alexander Todd wrote:
>
>> Erik,
>>
>> Another possibility is to texture your image onto
>> a plane and use a vtkRenderWindow instead of
>> vtkImageWindow.  Then zooming is all taken care of
>> for you.
>>
>> Brian
>>
>> At 08:58 AM 6/8/00 +0100, Matt Clarkson wrote:
>> >You do this by connecting the volume
>> >to a vtkImageReslice filter, and extracting
>> >a 2D slice and connecting this to the viewer.
>> >You set the vtkImageReslice filter
>> >to extract a 2D image, ie. Set the extent to
>> >0 255 0 255 0 0
>> >
>> >The vtkImageReslice can then be adjusted to give
>> >different fields of view. Effectively you are resampling
>> >a 2D image each time rather than a 3D volume
>> >
>> >I didnt know that the image viewer had a camera
>> >as such.
>> >
>> >Anyway, hope this helps
>> >
>> >Matt
>> >
>> >
>> >Erik Sobel wrote:
>> >>
>> >> Does anyone know how to zoom an image in a vtkImageViewer (without
>> >> resampling the volume - since this messes up other parts of my
>> >> pipeline)?   Is it possible to just grab the camera used by the
>> >> vtkImageViewer and zoom it?
>> >>
>> >> Thanks,
>> >> Erik
>> >>
>> >> _______________________________________________
>> >> This is the private VTK discussion list.
>> >> Please keep messages on-topic. Check the FAQ at:
>> <http://public.kitware.com/cgi-bin/vtkfaq>
>> >> vtkusers mailing list
>> >> vtkusers at public.kitware.com
>> >> http://public.kitware.com/mailman/listinfo/vtkusers
>> >
>> >--
>> >Computational Imaging Science Group
>> >Radiological Sciences,
>> >Guy's Hospital
>> >London Bridge
>> >London
>> >SE1
>> >9RT
>> >Tel: +44 (0)20 7955 2380
>> >Fax: +44 (0)20 7955 4532
>> >E-mail: m.clarkson at umds.ac.uk
>> >WWW: http://carmen.umds.ac.uk/m.clarkson
>> >
>> >_______________________________________________
>> >This is the private VTK discussion list.
>> >Please keep messages on-topic. Check the FAQ at:
>> <http://public.kitware.com/cgi-bin/vtkfaq>
>> >vtkusers mailing list
>> >vtkusers at public.kitware.com
>> >http://public.kitware.com/mailman/listinfo/vtkusers
>> >
>> >
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
>> vtkusers mailing list
>> vtkusers at public.kitware.com
>> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
>vtkusers mailing list
>vtkusers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>





More information about the vtkusers mailing list