PCTINT

Pseudocolor Table Interpolation


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

Back to top

Description


PCTINT interpolates between non-zero colors in a pseudocolor table (PCT).
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
DBPCT * Integer Pseudocolor table segment 1 - 1  
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 input pseudocolor table segment.

DBPCT

Specifies the pseudocolor table segment (type 121) that holds the pseudocolor table to be interpolated.

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

PCTINT is used to interpolate non-zero color ranges in a pseudocolor table PCT segment between pre-initialized color values. All values to be interpolated should be black (0,0,0) before running PCTINT.

A typical use of PCTINT is to interpolate colors between known codings. For instance, specific colors might be attached to elevations of 10, 20, 30, and 40 meters, but with PCTINT it is possible to show gradual changes between these values.

A simple linear interpolation scheme is used to compute the new value of (0,0,0) PCT entries based on the previous and next non- zero color entry. If there are no previous and next colors, the (0,0,0) entries will not be replaced. Thus a range of zeros at the beginning or end of the table will remain zero.

Although pure black (0,0,0) values may not be used as a real color, it is possible to use near black (0,0,1) or (1,1,1) instead.

Back to top

Example

The following example reads a text file (rgb.txt) containing three color values to interpolate among, and then runs PCTINT to fill in all the missing (0,0,0) values.

The text file (rgb.txt) contains the following:
 rgb.txt:
   0 100   0 255
 100 100 120  50
 255 255 255 255
 
EASI>FILE="irvine.pix"          ! Already existing PCIDSK file
EASI>DBPCT=                     ! Create a new PCT segment
EASI>DBSN="Smooth"
EASI>PCTFORM="INOUT"
EASI>TFILE ="rgb.txt"
EASI>RUN PCTREAD

EASI>DBPCT=LASC               ! Use PCT segment created by PCTREAD
EASI>RUN PCTINT
      Input PCT:        Output PCT:
   0: 100   0 255       100   0 255
   1:   0   0   0       100   1 253
   2:   0   0   0       100   2 251
   3:   0   0   0       100   4 249
          ...               ...
  98:   0   0   0       100 118  54
  99:   0   0   0       100 119  52
 100: 100 120  50       100 120  50
 101:   0   0   0       101 120  51
 102:   0   0   0       102 128  53
 103:   0   0   0       103 120  54
          ...               ...
 253:   0   0   0       253 120 252
 254:   0   0   0       254 120 254
 255: 255 120 255       255 120 255

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