CLR

Clear image channels


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Related

Back to top

Description


CLR clears (overwrites) image channels by using specified gray values.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBOC * Integer 1 1 -    
VALU * Float Gray-level values 1 - 48  
DBOW Integer Raster output window 0 - 4 Xoffset, Yoffset, Xsize, Ysize

* Required parameter
Back to top

Parameter descriptions

FILE

The name of the PCIDSK file containing the channels to clear.

DBOC

The output channels to clear.

Note: You cannot specify duplicate channels.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

VALU

Lists the gray-level values to write to each output channel.

The number of values must be less than or equal to the number of channels in the expanded output channel list (DBOC). Each channel in the expanded output channel list is cleared using the corresponding value in this parameter.

If the number of values is less than the number of channels, the last value in the value list is used to clear the remaining channels in the expanded output channel list.

Acceptable gray-level values depend on the data type of the channel, listed as follows:

DBOW

The raster window (x-offset, y-offset, x-size, y-size) to clear. If no value is specified for DBOW, the entire layer is processed as output by default. X-offset and y-offset define the upper-left starting pixel coordinates of the window. X-size is the number of pixels that define the window width. Y-size is the number of lines that define the window height.

Back to top

Details

CLR overwrites (clears) all of the pixels in the specified image channels (DBOC) of an input image file (FILE) using defined gray-level values (VALU). Output channels can be set to different specified values.

Clearing occurs under the specified database output window (DBOW); by default, the entire channel is processed.

Back to top

Examples

Clear channel 2 with the gray-level value 0, and channel 5 with the gray-level value 255.

EASI>FILE = "testfile.pix"
EASI>DBOC = 2,5
EASI>VALU = 0,255
EASI>DBOW =

EASI>RUN CLR

Clear the first 1024 image channels in the testfile.pix file in the upper-left 128 x 128 window, by setting all pixel gray-level values to zero.

EASI>FILE = "testfile.pix"
EASI>DBOC = 1,-1024
EASI>VALU = 0
EASI>DBOW = 0,0,128,128

EASI>RUN CLR

Clear the first six output channels to different gray-level values, and clear the remaining four output channels in the list to zero.

EASI>FILE = "testfile.pix"
EASI>DBOC = 1,-10
EASI>VALU = 1,2,3,4,5,6,0
EASI>DBOW =

EASI>RUN CLR

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.