Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | regionmanager |
tablename | inout | The table | |
Allowed: | Image tool, table tool or String | ||
confirm | in | Prompt for confirmation | |
Allowed: | T or F | ||
Default: | F | ||
verbose | in | Report successful saves | |
Allowed: | T or F | ||
Default: | T | ||
regionname | in | Name(s) of the region(s) when saved in the table | |
Allowed: | Vector of strings | ||
regionrec | in | Region(s) to save | |
Allowed: | Record of region tool(s) |
This function saves regions into an AIPS++ Table. It is just like tool fromglobaltotable except that the input regions are stored in a record rather than existing in global name space.
For the tablename argument, you can specify an image tool, a table tool, or a string. If you give a string, it should be the name of an existing AIPS++ Table on disk (any kind of table) or a new Table which will be created for you. The new table has no useful structure beyond housing the regions for you.
You can specify the name that each region will have (regionname) when it is saved in the Table. If you don't specify this, the field name of the corresponding region in the record is used.
- im := image('hcn') - r := [=] - r[1] := drm.box() - r[2] := drm.quarter() - drm.fromrecordtotable(im, T, F, "x1 x2", r) - drm.namesintable(im) x1 x2In this example, we save two regions stored in the record r to the table (previously containing no regions) referred to by the Image tool im. The regions are renamed to `x1' and `x2' as they are stored.
- im1 := image('hcn') - im2 := image('hcn2') - r := drm.fromtabletorecord(im1) - names := drm.namesintable(im1) - drm.fromrecordtotable(im2, T, F, names, r)
In this example, we recover the regions into a record from one image, and then copy them to another.