Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image.putchunk - Function Up: image - Tool Previous: image.open - Function


image.pixelvalue - Function



Package general
Module images
Tool image


Get value of image and mask at specified pixel coordinate


Synopsis
pixelvalue(pixel)


Arguments

pixel in Pixel coordinate
    Allowed: Vector of integer
    Default: Reference pixel


Returns
Glish record, unset, or fail


Description

This function gets the value of the image and the mask at the specified pixel coordinate. The values are returned in a Glish record with fields 'value', 'mask' and 'pixel'. The value is returned as a quantity, the mask as a Bool (T is good). The 'pixel' field holds the actual pixel coordinate used.

If the specified pixel coordinate is off the image, unset is returned.

Excessive elements in pixel are silently discarded. Missing elements are given the (nearest integer) value of the reference pixel. This is reflected in the output record 'pixel' field.



Example
- im := imagemaketestimage();
- im.pixelvalue()
[mask=T, value=[value=2.50643158, unit=Jy/beam], pixel=[56 38] ] 
-
- im.pixelvalue([0,0])
[i_am_unset=i_am_unset] 
-
- im.pixelvalue([10])
[mask=T, value=[value=0.140122071, unit=Jy/beam], pixel=[10 38] ] 
-
- im.pixelvalue([10,10,10])
[mask=T, value=[value=-0.452527285, unit=Jy/beam], pixel=[10 10] ]





next up previous contents index
Next: image.putchunk - Function Up: image - Tool Previous: image.open - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01