RDPIX Procedure
Standard Library procedure that displays x, y, and pixel values at the location of the cursor in the image displayed in the currently active window.
Usage
RDPIX, image[, x0, y0]
Input Parameters
image—Image array loaded into current window. May be any type. Pixel values are read from within the image borders; they are not read in relation to the full display area of the screen. This avoids scaling difficulties.
x0—The x-coordinate of the lower-left corner of the image displayed in the currently active window.
y0—The y-coordinate of the lower-left corner of the image displayed in the currently active window.
Keywords
None.
Discussion
The x, y, and pixel values under the cursor position are constantly displayed and updated. Pressing the left or center button makes a new line of output, saving the old line on the display. Pressing the right mouse button exits the procedure.
Example
; Read in the image file.
OPENR, lun, !Data_dir + 'mandril.img', /Get_lun
mandril_img = BYTARR(512, 512)
READU, lun, mandril
; Display the image.
TV, mandril_img
; Press left or center mouse button to see pixel values, and the
; right mouse button to quit.
RDPIX, mandril_img
; Display image offset on the screen by 100 pixels vertically and
; horizontally.
TV, mandril_img, 100, 100
; Read pixel values from the offset image. Then press the left or
; center mouse button to see pixel values, and right mouse button
; to quit.
RDPIX, mandril_img, 100, 100
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.