Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | regionmanager |
image | in | Image of interest | |
Allowed: | Image tool | ||
pseudoregionvalue | in | Psuedoregion event value | |
Allowed: | Glish record | ||
ddoptions | in | Options from display data | |
Allowed: | Record | ||
intersect | in | Intersect with move plane ? | |
Allowed: | T or F | ||
Default: | T |
This function is for use with the pseudoregion event emitted by a Displaypanel created by a Viewer. This function converts the pseudo-region (a region of 2-dimensions only) into a true world region by application of the Coordinate System. If the record is empty, the returned region describes the entire image.
This function is not intended for general-user use.
You must provide
If intersect=T then the pseudoregion is intersected with the plane of the current movie axis and hidden axes. If intersect=F then the pseudoregion is intersected with the current hidden axes pixels only.
include 'image.g' include 'viewer.g' include 'regionmanager.g' # im : =image('myimage') displaypanel := dv.newdisplaypanel() displaydata := dv.loaddata(im.name(F), 'raster') r1 := drm.quarter() displaydata.setoptions([region=r1]) displaypanel.register(displaydata) # whenever displaypanel->pseudoregion do { options := displaydata.getoptions() region := drm.pseudotoworldregion(im, $value, options) if (is_fail(region)) fail im.statistics(region=region) }
In this example, we use the default viewer (dv) to create a displaypanel on which we register a displaydata which will display the specified image as a raster. A region specifying a quarter of the image is given. When the user interactively generates a region, the event is caught and the pseudo-region event converted to a true world region with the default regionmanbager, drm. The region is then used to evaluate statistics from the image.