Next: Specifying Sub-Image
Up: MIDAS Data Structures
Previous: Specifying Elements in
In some commands it is necessary to specify the columns and rows of
an image to which that command should refer.
This is done in the following way for e.g. a 2-dim frame:
frame[x1,y1:x2,y2]
where the column specification, x or the row specification,
y can be any of
- world coordinates, indicated via real or integer numbers: 20.0,300
- pixel numbers, indicated via integers preceded by @: @35,@200
- or a special symbol to indicate
start (<), or end (>) of a row or column;
thus [@20,<:@20,>] specifies the complete 20th column of
a 2-dimensional image
World coordinates are the physically meaningful coordinates with units such as
wavelengths or arc seconds (which are defined in the descriptor CUNIT).
Pixel numbers (starting with 1 for each dimension) are the indices
of an image seen as an array.
For example, extracting the complete 12th plane from the 3-dim image stored in
cube.bdf is done via
EXTRACT/IMAGE plane12 = cube[<,<,@12:>,>,@12]
Single pixels can also be written in a more direct way, via
frame[x,y,z] = value, e.g. to set the pixel in row 27 and column 1023 of
the 2-dim image lola.bdf to 1.234, use
lola[@1023,@27] = 1.234
The value can also be an expression made up of constants and elements
of any MIDAS data structure, see the subsection .
Some of the commands dealing with images are:
READ/IMAGE, WRITE/IMAGE, COMPUTE/IMAGE, STATIST/IMAGE,
DELETE/IMAGE, COPY/II.
Rein Warmels
Mon Jan 22 12:06:29 MET 1996