Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
pixel | in | Pixel coordinate | |
Allowed: | Vector of integer | ||
Default: | Reference pixel |
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.
- 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] ]