ZOOM Procedure
Expands and displays part of an image or graphic plot.
Usage
ZOOM
Input Parameters
None.
Keywords
Fact—The zoom expansion factor, an integer. (Default: 4)
Continuous—If set, causes the zoom window to track the mouse cursor. This obviates the need to press the left mouse button to mark the center of the zoom. No effect if NoNew is set.
Interp—Specifies the interpolation method to be used. If nonzero, uses the bilinear interpolation method. Otherwise, uses the nearest neighbor method (the default).
NoClose—If set, the newly created window will not be closed. No effect if NoNew is set.
NoNew—If set, the original window is used to show the zoomed image. If this keyword is set, Continuous, NoClose, XSize, and YSize are ignored.
Quiet—Directions (Left click to zoom, and so on) are not printed to the console window.
Restore—If set and NoNew is set, the original image is restored when ZOOM exits. It has no effect unless NoNew is set.
Rubberband—If set, allows the user to select the zoom region by dragging a rubberband box around that region.
XPos—X position of the newly created zoom window.
XSize—The width of the new window, in pixels. (Default: 512 unless NoNew is set, where the window size doesn't change)
YPos—Y position of the newly created zoom window.
YSize—The height of the new window, in pixels. (Default: 512 unless NoNew is set, where the window size doesn't change)
Discussion
ZOOM works only on windowing systems. It provides a quick way to get a close look at your image.
ZOOM lets you click with your mouse button on the center point of a region in a previously displayed window to bring up an enlarged view of this region in a new window. Then use your mouse buttons as follows:
Use the left mouse button to choose the center point of the region to be zoomed in on from the original image.
Use the middle mouse button to display a window for choosing the zoom factor.
note | If you have a two-button mouse, <Shift> in combination with the left mouse button works the same as a middle button. |
Use the right button to exit the ZOOM procedure.
Example
; Read in the image file.
OPENR, 1, !Data_dir + 'mandril.img'
mandril = BYTARR(512, 512)
READU, 1, mandril
CLOSE, 1
; Display the image file.
WINDOW, Xsize=512, Ysize=512
TVSCL, mandril
; Use ZOOM with default values. The mouse button functions
; will be described in the original window.
ZOOM
; Use ZOOM with the zoom factor set to 2.
ZOOM, Fact=2
; Use ZOOM with zoomed region displayed using nearest neighbor
; sampling.
ZOOM, Interp=0
; Use ZOOM with zoomed region displayed using bilinear
; interpolation.
ZOOM, Interp=1
; Display the new image in a window that is 200-by-200 pixels.
ZOOM, XSize=200, YSize=200
; Run ZOOM where it continually samples the cursor.
; There is no need to click.
ZOOM, /Continuous
; Run ZOOM without creating a new window, which allows subsequent
; zooming. The original image is restored when ZOOM ends.
ZOOM, Fact=2, /NoNew, /Restore
See Also
For details on interpolation methods, see the PV‑WAVE User’s Guide.