| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Related |
| Back to top |
| Back to top |
lutwrit(file, dblut, lutform, tfile)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | Input file name | 1 - | |
| DBLUT * | List[int] | Input lookup table segment | 1 - | |
| LUTFORM * | str | LUT text format | 3 - 5 | ATT | INOUT | OUT |
| TFILE * | str | Output text file name | 1 - |
| Back to top |
FILE
Specifies the name of the PCIDSK image file that contains the lookup table to write to a text file.
DBLUT
Specifies the segment that contains the lookup table (LUT type 170) or breakpoint lookup table (BLUT type 172).
LUTFORM
Specifies the text format in which the lookup table will be written to the text file.
TFILE
Specifies the name of the output text file to receive lookup table data.
This text file must not exist before executing LUTWRIT.
| Back to top |
LUTWRIT transfers a lookup table from an input file (FILE) from an input LUT segment (DBLUT) to a text file (TFILE). This function allows the creation, revision, and exchange of lookup table data between other image analysis systems, using a text file.
The output text file (TFILE) must not exist before running LUTWRIT.
| Back to top |
Example for Attribute format
Create a text file in attribute format:
from pci.lutwrit import lutwrit file = "irvine.pix" dblut = [6] lutform = "ATT" tfile = "att.txt" lutwrit( file, dblut, lutform, tfile )
The resulting text file is shown below:
! lookup table (attribute format)
!
! min: max ; output
!
0 : 6 ; 0
7 ; 38
8 ; 54
9 ; 67
10 ; 77
11 ; 86
12 ; 94
13 ; 102
14 ; 109
15 ; 115
16 ; 122
17 ; 128
18 ; 133
19 ; 139
20 ; 144
21 ; 149
22 ; 154
23 ; 159
24 ; 163
25 ; 168
26 ; 172
27 ; 176
28 ; 180
29 ; 184
30 ; 188
31 ; 192
32 ; 196
33 ; 200
34 ; 203
35 ; 207
36 ; 211
37 ; 214
38 ; 217
39 ; 221
40 ; 224
41 ; 227
42 ; 231
43 ; 234
44 ; 237
45 ; 240
46 ; 243
47 ; 246
48 ; 249
49 ; 252
50 : 255 ; 255
Example for INOUT format
Create a text file in input/output format:
from pci.lutwrit import lutwrit file = "irvine.pix" dblut = [6]; lutform = "INOUT" tfile = "inout.txt" lutwrit( file, dblut, lutform, tfile )
The resulting text file is shown below:
0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 38 8 54 9 67 10 77 11 86 12 94 13 102 14 109 15 115 16 122 17 128 18 133 19 139 20 144 21 149 22 154 23 159 24 163 25 168 26 172 27 176 28 180 29 184 30 188 31 192 32 196 33 200 34 203 35 207 36 211 37 214 38 217 39 221 40 224 41 227 42 231 43 234 44 237 45 240 46 243 47 246 48 249 49 252 50 255 51 255 52 255 53 255 54 255 55 255 56 255 57 255 58 255 59 255 60 255 61 255 62 255 63 255 64 255 65 255 66 255 67 255 68 255 69 255 70 255 71 255 72 255 73 255 74 255 75 255 76 255 77 255 78 255 79 255 80 255 81 255 82 255 83 255 84 255 85 255 86 255 87 255 88 255 89 255 90 255 91 255 92 255 93 255 94 255 95 255 96 255 97 255 98 255 99 255 100 255 101 255 102 255 103 255 104 255 105 255 106 255 107 255 108 255 109 255 110 255 111 255 112 255 113 255 114 255 115 255 116 255 117 255 118 255 119 255 120 255 121 255 122 255 123 255 124 255 125 255 126 255 127 255 128 255 129 255 130 255 131 255 132 255 133 255 134 255 135 255 136 255 137 255 138 255 139 255 140 255 141 255 142 255 143 255 144 255 145 255 146 255 147 255 148 255 149 255 150 255 151 255 152 255 153 255 154 255 155 255 156 255 157 255 158 255 159 255 160 255 161 255 162 255 163 255 164 255 165 255 166 255 167 255 168 255 169 255 170 255 171 255 172 255 173 255 174 255 175 255 176 255 177 255 178 255 179 255 180 255 181 255 182 255 183 255 184 255 185 255 186 255 187 255 188 255 189 255 190 255 191 255 192 255 193 255 194 255 195 255 196 255 197 255 198 255 199 255 200 255 201 255 202 255 203 255 204 255 205 255 206 255 207 255 208 255 209 255 210 255 211 255 212 255 213 255 214 255 215 255 216 255 217 255 218 255 219 255 220 255 221 255 222 255 223 255 224 255 225 255 226 255 227 255 228 255 229 255 230 255 231 255 232 255 233 255 234 255 235 255 236 255 237 255 238 255 239 255 240 255 241 255 242 255 243 255 244 255 245 255 246 255 247 255 248 255 249 255 250 255 251 255 252 255 253 255 254 255 255 255
Example for OUT format
Create a text file using output format:
from pci.lutwrit import lutwrit file = "irvine.pix" dblut = [6] lutform = "OUT" tfile = "out.txt" lutwrit( file, dblut, lutform, tfile )
The resulting text file is shown below:
0 0 0 0 0 0 0 38 54 67 77 86 94 102 109 115 122 128 133 139 144 149 154 159 163 168 172 176 180 184 188 192 196 200 203 207 211 214 217 221 224 227 231 234 237 240 243 246 249 252 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.