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


next up previous contents index
Next: regionmanager.pseudotoworldregion - Function Up: regionmanager - Tool Previous: regionmanager.namesintable - Function


regionmanager.pixeltoworldregion - Function



Package general
Module images
Tool regionmanager


Convert a simple pixel region to a world region


Synopsis
pixeltoworldregion(csys, shape, region)


Arguments

csys in The coordinate system to use in the conversion
    Allowed: Image tool
shape in The shape to use for fractional coordinates
    Allowed: Vector of integers
    Default: Unset
region in The region
    Allowed: Region tool


Returns
Region tool or fail



Description

This function converts the simple pixel regions to world regions. This function is provided because compound regions require world regions. You specify a Coordinate System tool for the conversions as well as the pixel region. You only need to supply a shape if the coordinates use fractional coordinates.

Currently, this function can only convert pixel boxes.



Example
- im := image('hcn')
- cs := im.coordsys()
- r1 := drm.box([10,20,30], [50,60,70])
- r2 := drm.pixeltoworldregion(csys=cs, region=r1)
- drm.isworldregion(r1)
F
- drm.isworldregion(r2)
T
- im.boundingbox(r1)
[blc=[10 20 30] , trc=[50 60 70] , inc=[1 1 1] , bbShape=[41 41 41] , 
regionShape=[41 41 41] , imageShape=[155 178 256] ] 
-
- im.boundingbox(r2)
[blc=[10 20 30] , trc=[50 60 70] , inc=[1 1 1] , bbShape=[41 41 41] , 
regionShape=[41 41 41] , imageShape=[155 178 256] ]






next up previous contents index
Next: regionmanager.pseudotoworldregion - Function Up: regionmanager - Tool Previous: regionmanager.namesintable - 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