REC

Create Recode-LUT Segment


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


REC creates or overwrites a 256-value database lookup table layer, which can be used to transform or recode 8-bit image data stored in image layers. Unspecified lookup table values can be defaulted to either zero or identity. No image data is changed.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBLUT Integer Output lookup table segment 0 - 1  
BACK String Default background 0 - 4 IDEN, ZERO
Default: ZERO
DBSN * String Output LUT segment name 1 - 8  
DBSD String Output LUT segment description 0 - 64  
R000 Integer Recode values: 0-15 0 - 16 0 - 255
R016 Integer Recode values: 16-31 0 - 16 0 - 255
R032 Integer Recode values: 32-47 0 - 16 0 - 255
R048 Integer Recode values: 48-63 0 - 16 0 - 255
R064 Integer Recode values: 64-79 0 - 16 0 - 255
R080 Integer Recode values: 80-95 0 - 16 0 - 255
R096 Integer Recode values: 96-111 0 - 16 0 - 255
R112 Integer Recode values: 112-127 0 - 16 0 - 255
R128 Integer Recode values: 128-143 0 - 16 0 - 255
R144 Integer Recode values: 144-159 0 - 16 0 - 255
R160 Integer Recode values: 160-175 0 - 16 0 - 255
R176 Integer Recode Values: 176-191 0 - 16 0 - 255
R192 Integer Recode values: 192-207 0 - 16 0 - 255
R208 Integer Recode values: 208-223 0 - 16 0 - 255
R224 Integer Recode values 224-239 0 - 16 0 - 255
R240 Integer Recode values: 240-255 0 - 16 0 - 255
REPORT String Report mode 0 - 192 Quick links
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK file from which the image data is to be read.

DBLUT

Specifies the segment to receive the output lookup table. If this parameter is specified, the lookup table segment is overwritten. If it is not specified, a new lookup table segment is created.

BACK

Specifies whether the default background lookup table values should be zero or identity. Valid values are:

DBSN

Specifies a name (up to 8 characters) for the output LUT segment.

DBSD

Describes (in up to 64 characters) the contents or origins of the output LUT segment.

R000

Specifies 16 lookup table (recode) values for gray levels between nnn and nnn+15 inclusive. In general, Rnnn(x) specifies a lookup table value for gray level nnn + x - 1, where 'nnn' is between 0 and 240 and is a multiple of 16, and where 'x' is between 1 and 16. Therefore, R000(1) specifies a lookup table value for gray level 0, and R240(16) specifies a lookup table value for gray level 255.

Values must be between 0 and 255. Default values are determined by the BACK (Default Background) parameter. Each value of Rnnn must be specified, if no defaults are desired.

Please refer to the 'Example' section for more information on specifying the various recode values.

R016

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R032

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R048

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R064

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R080

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R096

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R112

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R128

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R144

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R160

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R176

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R192

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R208

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R224

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

R240

Refer to the Parameter Details for R000 (Recode Values: (0 to 15)).

REPORT

Specifies where to direct the generated report.

Available options are:

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

REC creates an arbitrary lookup table, which can be used to recode gray levels stored on 8-bit database image channels. You can perform the same function using LUTREAD, which reads lookup table values from a text file.

A lookup table for 256 gray levels (between 0 and 255) is created by assigning values to the various recode value parameters. The default value for these parameters is either zero or identity, as determined by the BACK (Default Background) parameter. The values can be any arbitrary 8-bit value and do not have to increase monotonically.

If DBLUT (Output) is not specified, REC creates a new database lookup table segment (type 170). The name and description of the new segment are specified by DBSN (LUT Layer Name) and DBSD (LUT Layer Description) parameters respectively.

If DBLUT (Output) is specified, REC overwrites the lookup table on the existing database segment. The name and description of the existing segment are not changed.

The number of the new segment is saved in the output parameter LASC.

Back to top

Example

Create a lookup table that does the following:
  • Leaves all values between 0 and 31 in the image unchanged (identity background)
  • Sets values between 32 and 99 to 1
  • Sets values between 100 and 149 to 2
  • Sets values between 150 and 199 to 4
  • Sets values between 200 to 255 to 3
EASI>FILE="irvine.pix"
EASI>DBLUT=
EASI>BACK="IDEN"
EASI>DBSN="RECODE"
EASI>DBSD="Recode values from 32 to 255"
EASI>R000= 
EASI>R016= 
EASI>R032=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
EASI>R048=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
EASI>R064=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
EASI>R080=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
EASI>R096=1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2
EASI>R112=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
EASI>R128=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
EASI>R144=2,2,2,2,2,2,4,4,4,4,4,4,4,4,4,4
EASI>R160=4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
EASI>R176=4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
EASI>R192=4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3
EASI>R208=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
EASI>R224=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
EASI>R240=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
EASI>RUN REC

The resulting lookup table is written to the file "irvine.pix". The segment number is written to the output parameter LASC.

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