ADAPT

Make adaptive PCT


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

Back to top

Description


ADAPT generates a pseudocolor table (PCT), which can be used to optimally represent a provided RGB image. The 24-bit image is translated to an 8-bit pseudocolor table using an adaptive PCT algorithm.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBIC * Integer Input RGB channels 3 - 3  
DBPCT Integer Output PCT channel 0 - 1  
DBSN String Output segment name 0 - 8  
DBSD String Output segment description 0 - 64  
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 image file containing the imagery channels to process.

DBIC

Specifies the three 8-bit channels (R, G, B) containing the input raster image.

If R, G, and B are all the same channel number, this is equivalent to specifying a black and white image.

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.

DBPCT

Optionally specifies the output pseudocolor table (PCT) channel segment to receive data. If no segment is specified, a new segment is created.

If a new segment is created, the LASC parameter is updated with the segment number.

DBSN

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

This value is used only if a new pseudocolor segment is created.

DBSD

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

This value is used only if a new pseudocolor segment is created.

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

ADAPT creates a pseudocolor table (PCT, segment type 171) using as input three channels (DBIC) representing an RGB (color) image. The 24-bit input image is translated to an 8-bit pseudocolor table using an adaptive PCT algorithm. The PCT may then be used as input to ERRDIFF, which converts an RGB image to a pseudocolored image based on a given PCT.

Input RGB channels (DBIC) must be 8-bit channels, due to the 8-bit nature of a pseudocolor table. While any type of image channel may be used, values are internally converted to 8-bit data. Using non-8-bit data may result in unexpected or poor results.

Back to top

Examples

Convert a 24-bit image into a pseudocolored image before exporting as a TIFF file.

EASI>FILE    =   "map100.pix"         
EASI>DBIC    =   1,2,3
EASI>DBPCT   =               ! Default, creates new PCT segment
EASI>DBSN    =   "Adapt"     ! Name for new PCT segment
EASI>DBSD    =

EASI>RUN ADAPT               ! Compute Optimal PCT

Use ERRDIFF to transform the RGB image into a pseudocolored image, based on the adaptive PCT.

EASI>FILE    =   "map100.pix"
EASI>DBIC    =   1,2,3
EASI>DBOC    =   1
EASI>DBPCT   =   3           ! New PCT segment from ADAPT

EASI>RUN ADAPT

Convert the 8-bit image to a TIF raster file using FEXPORT.

EASI>FILI        =   file
EASI>FILO        =   "map100.tif"
EASI>DBIW        =   
EASI>DBIC        =   1
EASI>DBIB        =
EASI>DBVS        =
EASI>DBLUT       =
EASI>DBPCT       =
EASI>FTYPE       =   "TIF"
EASI>foptions    =   

EASI>RUN FEXPORT

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