**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 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:**\\ [[jvs:cigal:manual:chapter1:iprocs|IPROCS(1)]], [[jvs:cigal:manual:chapter3:map|MAP(3)]], [[jvs:cigal:manual:chapter2:sketch|SKETCH(2)]], [[jvs:cigal:manual:chapter4:vimage|VIMAGE(4)]] [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter3|Functions List]], [[jvs:cigal:manual:help|Manual Help]]