User Tools

Site Tools


jvs:cigal:manual:chapter3:mask

CIGAL Reference Manual, Chapter 3 (Functions): MASK

MASK -- Use a mask to select part of a variable

usage: varb2 = mask(varb1,maskvarb,thresh,compressflag)

MASK copies a portion of the input variable (VARB1) to the output variable (VARB2), where the portion is determined by the MASKVARB argument. MASKVARB can be any of the following:

.  - a variable with the same dimensions as VARB1; values in VARB1 that
     correspond to non-zero values in MASKVARB are copied to VARB2 (see THRESH)
   - a number: 
               0 - use the cursor to enter a box (VARB1 values within the box
                   are copied)
               1 - use the cursor to outline the region to be copied; press
                   <RETURN> or the left button to trace the outline, any other
                   key when done

The other arguments to MASK have the following meanings:

  THRESH:       If MASKVARB is a variable with many values, values less than or
                equal to THRESH are considered zeros (default: THRESH = 0).
  COMPRESSFLAG: If non-zero, compress the output array by skipping values not
                within the masked region (default: COMPRESSFLAG = 0).

The total number of pixels within the masked region is returned in register variable 0 (#0).

See Also:
IPROCS(1), MAP(3), SKETCH(2), VIMAGE(4)

CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/mask.txt · Last modified: 2023/02/23 18:43 (external edit)