Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | regionmanager |
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 |
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.
- 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] ]