Image Region of Interest (region)

Most image-related tasks can process a subset of the pixels in an input image. Depending on the task, the selected pixels may either be a fairly arbitrary region, or only a regular subimage of the input image.

The task parameter, region, which gives the region-of-interest consists of a combination of subcommands. Each subcommand specifies either a subregion or the units of the coordinates used in subsequent sub-commands.

The subregions selected by multiple subcommands are effectively `OR-ed' together to form the overall region. That is, the overall region selected is the `union' (not intersection) of the subregions.

For comparatively simple regions, combining subcommands is quite adequate. However for complex regions, a cursor-based program, cgcurs, may be the most convenient for generating the subcommands.

Region specification is composed of one or more of the following subcommands. Each subcommand can be abbreviated to uniqueness, and subcommands are separated by a comma.

This selects the image planes z1 to z2 inclusive. z2 is optional, defaulting to the same value as z1.
This is somewhat like the images command, except that it selects only the central quarter of each plane. Both z1 and z2 are optional.
This subcommand selects the pixels within a box whose corners are xmin, ymin,xmax and ymax. z1 and z2 are optional, and are the same as in the image subcommand. If the (z1,z2) part is missing, a default is used (generally all planes are selected).
This gives the vertices of a polygon.
is equivalent to
z1 and z2 are the same as with the images and boxes subcommands.
This selects pixels according to the mask given by the mask item in the dataset name.

The units used for the coordinates are controlled by the following subcommands:

Subsequent coordinates are given as absolute pixel values (i.e. values ranging from 1 to NAXISi - see prthd or itemize). This affects image coordinates and the coordinates along the third dimension. This is also the default.
Subsequent image coordinates are relative to the reference pixel, as defined by the header of the map of interest. Use prthd to see the reference pixel is (CRPIXi).
Subsequent image coordinates are relative to the central pixel of the image. This is somewhat like the relpixel command, but used the image centre, rather than the reference pixel.
Subsequent image coordinates are given in arcseconds, and are relative to the reference pixel of the map of interest.
Subsequent coordinates in the third dimension are given in km/s.

For example, to specify a 21 by 21 region, centred on the reference pixel, use:

or to give a 10 by 10 region in the lower left corner of the image, use
If there are multiple maps in the file, use
to select the first 2 maps.

The region-of-interest specifications can become rather involved, when complex regions are used. As with visibility data selection, @ files (see Section 2.5) are a convenient way to store these.

There are some warnings for those accustomed to the select visibility data selection method:

Miriad manager