| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 1383 |
|
| Package | general | |
| Module | images | |
| Tool | regionmanager |
| region | in | The region to extend | |
| Allowed: | Region tool | ||
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.
- 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