LUTWRIT -- Write LUT to Text File

Writes lookup table data from a lookup table segment to a text file.

See Also: LUTREAD, PCTWRIT

PARAMETERS

LUTWRIT is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBLUT    Database Lookup Table                   1-1       Int
LUTFORM  LUT Text Form: ATT/INOUT/OUT            3-5       Char
TFILE    Text File                               1-64      Char

FILE

Specifies the name of the PCIDSK image file which contains the lookup table.

 EASI>FILE="filespec"

DBLUT

Specifies the number of the database segment containing the lookup table (type 170).

 EASI>DBLUT=i

LUTFORM

Specifies the text format (ATT/INOUT/OUT) in which the lookup table will be written to the text file.

 EASI>LUTFORM="ATT"      | attribute format

 EASI>LUTFORM="INOUTn"   | input/output format: `n' entries/line
 EASI>LUTFORM="OUTn"     | output format: `n' entries/line

 EASI>LUTFORM="INOUT"    | input/output format: 8 entries/line
 EASI>LUTFORM="OUT"      | output format: 16 entries/line
For the INOUT and OUT formats, `n' specifies the number of table entries written per line in the text file. For the INOUT format, there are two integer values per table entry (input value, output value); for the OUT format, there is only one output value per table entry. If `n' is not specified, it defaults to 8 for the INOUT format, and 16 for the OUT format.

TFILE

Specifies the name of the output text file to which lookup table data are written.

 EASI>TFILE="textfile name"
This text file must not exist before LUTWRIT is run.

DETAILS

LUTWRIT transfers a lookup table on a database file (FILE) from an LUT segment (DBLUT) to a text file (TFILE). The objective of this program is to allow the creation, revision, and exchange of lookup table data between EASI/PACE and other image analysis systems, using a text file.

There are three text file formats (LUTFORM) available:

TFILE must not exist before running LUTWRIT.

EXAMPLE

Create a lookup table segment which performs square root contrast stretching of input grey level values between 100 and 120. Use the STR program to create an LUT segment on the database.

 EASI>FILE="local.pix"
 EASI>DBLUT=
 EASI>DBSN="STRETCH"
 EASI>DBSD="Square root contrast stretch between 100 and 200"
 EASI>DBIC=     
 EASI>EXPO=0.5
 EASI>ISTR=100,120
 EASI>OSTR=
 EASI>LCTR=
 EASI>HCTR=
 EASI>DBIW=
 EASI>DBIB=
 EASI>RUN STR
An example of the text files created by LUTWRIT follows.

ATTRIBUTE FORMAT

Create a text file in attribute format:

 EASI>DBLUT=LASC
 EASI>LUTFORM ="ATT"
 EASI>TFILE="att.txt"
 EASI>RUN LUTWRIT
The resulting text file is shown below:

 !
 ! lookup table (attribute format)
 !
 ! min:  max ; output
 !
    0 :  100 ;    0
         101 ;   57
         102 ;   81
         103 ;   99
         104 ;  114
         105 ;  128
         106 ;  140
         107 ;  151
         108 ;  161
         109 ;  171
         110 ;  180
         111 ;  189
         112 ;  198
         113 ;  206
         114 ;  213
         115 ;  221
         116 ;  228
         117 ;  235
         118 ;  242
         119 ;  249
  120 :  255 ;  255

INOUT FORMAT

Create a text file in input/output format:

 EASI>DBLUT=LASC
 EASI>LUTFORM="INOUT"
 EASI>TFILE="inout.txt"
 EASI>RUN LUTWRIT
The resulting text file is shown below:

   0   0   1   0   2   0   3   0   4   0   5   0   6   0   7   0
   8   0   9   0  10   0  11   0  12   0  13   0  14   0  15   0
  16   0  17   0  18   0  19   0  20   0  21   0  22   0  23   0
  24   0  25   0  26   0  27   0  28   0  29   0  30   0  31   0
  32   0  33   0  34   0  35   0  36   0  37   0  38   0  39   0
  40   0  41   0  42   0  43   0  44   0  45   0  46   0  47   0
  48   0  49   0  50   0  51   0  52   0  53   0  54   0  55   0
  56   0  57   0  58   0  59   0  60   0  61   0  62   0  63   0
  64   0  65   0  66   0  67   0  68   0  69   0  70   0  71   0
  72   0  73   0  74   0  75   0  76   0  77   0  78   0  79   0
  80   0  81   0  82   0  83   0  84   0  85   0  86   0  87   0
  88   0  89   0  90   0  91   0  92   0  93   0  94   0  95   0
  96   0  97   0  98   0  99   0 100   0 101  57 102  81 103  99
 104 114 105 128 106 140 107 151 108 161 109 171 110 180 111 189
 112 198 113 206 114 213 115 221 116 228 117 235 118 242 119 249
 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

OUT FORMAT

Create a text file using output format:

 EASI>DBLUT=LASC
 EASI>LUTFORM="OUT"
 EASI>TFILE="out.txt"
 EASI>RUN LUTWRIT
The resulting text file is shown below:

   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
   0   0   0   0   0  57  81  99 114 128 140 151 161 171 180 189
 198 206 213 221 228 235 242 249 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

About PCI Help Gateway