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


regionmanager.fromrecordtotable - Function



Package general
Module images
Tool regionmanager


Save regions stored in a record into a Table


Synopsis
fromrecordtotable(tablename, confirm, verbose, regionname, regionrec)


Arguments

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)


Returns
Bool or fail


Description

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.



Example
- im := image('hcn')
- r := [=]
- r[1] := drm.box()
- r[2] := drm.quarter()
- drm.fromrecordtotable(im, T, F, "x1 x2", r)
- drm.namesintable(im)
x1 x2
In 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.



Example
- 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.





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