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.toworld - Function Up: image - Tool Previous: image.type - Function


image.topixel - Function



Package general
Module images
Tool image


Convert from world to pixel coordinate


Synopsis
topixel(value)


Arguments

value in Absolute world coordinate
    Allowed: Numeric vector, vector of quantities or record
    Default: Reference value


Returns
Vector of float or fail



Description

This function converts from absolute world to pixel coordinate (1-rel). The world coordinate can be provided in many formats (numeric, string, quantum etc.) via the argument value. These match the output formats of function toworld.

This function is just a wrapper for the Coordsys tool function topixel so see the documentation there for a description and more examples.



Example
- im := imagemaketestimage();
- w := im.toworld([10,10], 'n')        # Numeric vector
- im.topixel(w)
[10 10]
- w := im.toworld([10,10], 'm')        # Record of measures
- im.topixel(w)
[10 10]
Convert to a pixel coordinate to world as floats and then back to pixel. Do the same with the world coordinate formatted as measures instead.





next up previous contents index
Next: image.toworld - Function Up: image - Tool Previous: image.type - 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