[vtkusers] 2D Zooming

Nathan Smith nsmith5 at gl.umbc.edu
Wed Sep 25 04:55:27 EDT 2002


Did you try changing the Dolly distance on the camera associated with the
renderer? This will do what you want. Rather than rendering the image
larger in the mapping phase, this "zooms" in on the final rendered image.
You could even do this before any display is made, to knock out any
intermediate changes in the render-window image.

renderer->GetActiveCamera()->Dolly(value)

Nate

On Wed, 25 Sep 2002, Raphael Sebbe wrote:

> Hi all,
>
> I have an array of tiff images loaded in VTK that I display, one slice
> at a time, 2 different ways:
>
> - 2D, vtkActor2D/vtkImageMapper
> - 3D, vtkImageActor
>
> For the 2D display solution, I'd like to be able to zoom the image, but
> could not achieve that so far. I tried
>
> imageMapper->UseCustomExtentsOn();
> imageMapper->SetCustomDisplayExtents(extents);
>
> but the rendered image is tiled, not zoomed.
>
> Raphael




More information about the vtkusers mailing list