| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | String | Output file name | 1 - 192 | |
| DBPCT | Integer | Output PCT segment | 0 - 1 | |
| DBSN * | String | Output PCT segment name | 1 - 8 | |
| DBSD | String | Output segment description | 0 - 64 | |
| PCTFORM | String | PCT text format | 0 - 5 | ATT | INOUT | OUT Default: ATT |
| TFILE * | String | PCT text file name | 1 - 192 |
| Back to top |
FILE
Specifies the name of the PCIDSK image file to receive the PCT segment.
DBPCT
Specifies the output segment to receive the pseudocolor table (PCT type 171 or BPCT type 173).
If this parameter is not unspecified, a new PCT segment is created.
DBSN
Specifies a name (up to 8 characters) for the output PCT segment.
This parameter is required only if a new output segment is created.
DBSD
Describes (in up to 64 characters) the contents or origins of the output PCT segment.
This parameter may be used ony if a new output segment is created.
PCTFORM
Specifies the text format of the pseudocolor table data in the text file.
TFILE
Specifies the name of the input text file that contains the pseudocolor table data to read.
| Back to top |
PCTREAD transfers pseudocolor table data from a specified text file (TFILE) to a pseudocolor table segment (DBPCT with PCT type 171 or BPCT type 173) in a database file (FILE), assuming a specified text file format (PCTFORM).
Attribute format (ATT): uses the PCI attribute data format for storing the pseudocolor table. For more information about attribute data, see Attributes in the GDB file format reference help.
The general format for a line of text is:
start : end ; red green blue ; comment
For example:
5 : 5 ; 255 0 255 ; magenta
Input/output format (INOUT): lists both an input value and three output values (red, green, and blue) for each table entry.
The general format for a line of text is:
input red green blue
For example:
5 255 0 255
Output format (OUT): lists only the three output values (red, green, and blue) for each table entry.
The general format for a line of text is:
red green blue
For example:
255 0 255
| Back to top |
Read a pseudocolor table from the text file 'classpct.txt', which stores a pseudocolor table in attribute format. This table can be used to display the results of a multispectral classification, where eight classes are assigned different colors. The text file is shown below:
! pseudocolor table for showing results of classification.
!
! min : max ; red green blue ; comments
!
0 ; 0 0 0 ; null class (black)
1 ; 255 0 0 ; class 1 (red)
2 ; 0 255 0 ; class 2 (green)
3 ; 0 0 255 ; class 3 (blue)
4 ; 255 255 0 ; class 4 (yellow)
5 ; 0 255 255 ; class 5 (cyan)
6 ; 255 0 255 ; class 6 (magenta)
7 ; 128 128 128 ; class 7 (gray)
8 ; 255 128 64 ; class 8 (orange)
9 : 255 ; 255 255 255 ; all other (white)
Read the text file into a new pseudocolor table segment, checking for the attribute data format.
EASI>file = 'local.pix' EASI>dbpct = EASI>dbsn = 'CLASSPCT' EASI>dbsd = 'PCT for showing results of 8-class classification' EASI>pctform = 'ATT' EASI>tfile = 'classpct.txt' EASI> run PCTREAD
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.