Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: imagefromshape - Constructor Up: image - Tool Previous: imagefromforeign - Constructor


imagefromimage - Constructor



Package general
Module images
Tool image


Construct a (sub)image from a region of an AIPS++ image


Synopsis
imagefromimage(outfile, infile, region, mask, dropdeg, overwrite)


Arguments

outfile in Output sub-image file name
    Allowed: String
    Default: unset
infile in Input image file name
    Allowed: String
region in The region of interest
    Allowed: Region tool
    Default: Whole image
mask in OTF mask
    Allowed: Boolean LEL expression or mask region
    Default: None
dropdeg in Drop degenerate axes
    Allowed: T or F
    Default: F
overwrite in Overwrite (unprompted) pre-existing output file ?
    Allowed: T or F
    Default: F


Returns
Image tool or fail


Description

This constructor applies a region-of-interest to an image file, creates a new image file containing the (sub)image, and associates a new image tool with it.

The input image file may be in native AIPS++, FITS, or Miriad format. Look here for more information on foreign images.

If outfile is given, the (sub)image is written to the specified disk file.

If outfile is unset, the Image tool actually references the input image file. So if you deleted the input image disk file, it would render this tool useless. When you destroy this tool (with the done function) the reference connection is broken.

Sometimes it is useful to drop axes of length one (degenerate axes). Use the dropdeg argument if you want to do this.

The output mask is the combination (logical OR) of the default input pixel mask (if any) and the OTF mask. Any other input pixel masks will not be copied. Use function maskhandler if you need to copy other masks too.

See also the subimage function.



Example
- im := imagefromimage(outfile='image.small', infile='image.large', region=drm.quarter())
The specified region-of-interest takes a quarter by area of the first two axes of the image, and all pixels of other axes.





next up previous contents index
Next: imagefromshape - Constructor Up: image - Tool Previous: imagefromforeign - Constructor   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