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.fromglobaltotable - Function Up: regionmanager - Tool Previous: regionmanager.extension - Function


regionmanager.extractsimpleregions - Function



Package general
Module images
Tool regionmanager


Extract all simple regions into a record


Synopsis
extractsimpleregions(region)


Arguments

region in The region to extend
    Allowed: Region tool


Returns
Record of Region tools or fail



Description

This function (short-hand name esr) extracts all simple (i.e. non-compound) regions from the given region tool. This might be useful to plot all of the simple regions that made up a compound region.



Example
- im := image('cube')
- cs := im.coordsys()
- drm.setcoordinates(cs)
-
- x := dq.quantity([40,45,48,55,48,43,40], 'pix')
- y := dq.quantity([40,43,59,60,53,48,45], 'pix')
- poly := drm.wpolygon(x, y, [1,3])
- box := drm.wbox(dq.quantity("20pix"), dq.quantity("30pix"), [2])
- 
- union := drm.union(box, poly);
- rec := drm.extractsimpleregions(union)
- print 'Number of extracted simple regions = ', length(rec)
2





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