The enhancement file, enh.tab

updated November, 2010
Note: significant extensions were made in FlAniS version 2.2 to the format of the "enh.tab" file to support the "probe" control...please see examples, below!

The basic enhancement table

When you want to color enhance gray-scale images, you need to define a text file named "enh.tab" which contains your color tables and breakpoint information.

This described the format of this file.

Each line of the file is either a

The Color Table Names are used to populate the pull-down list of choices in the User Interface.

The In-low and In-high give the source (gray scale image) values (range of 0 to 255). The rest of the line, gives the Red, Green and Blue output scaling (also within the range of 0:255). For example, if one had:

50 100 80 100 0 50 40 200

this would mean that for the gray-scale range of 50 to 100 in the original image, the pixels would be colored by scaling the values for Red between 80 and 100, for green between 0 and 50, and for blue between 40 and 200.

Values that are not covered by one of the input ranges are left with their original gray-scale intensity. For non-gray scale values, the results are tenuous.

Each Color Table must have at least one Color Definition, but may have as many as are needed. Values may be separated by one or more spaces (NO tabs!).

Adding advanced parameters

When you are using the color table to enhance overlays (see the "overlay_enhance" options), you may also add values for alpha (transparency).

In-low In-high Red-low Red-high Green-low Green-high Blue-low Blue-high Alpha-low Alpha-high

Where alpha values of 0 (zero) mean completely transparent; values of 255 are opaque.

In addition when you use the "probe" control, you should also supply the values for the probe readout. This is done by appending a values = list to the end of each line. For example:

50 100 80 100 0 50 40 200 values = -13.4, 22.9, 1

Where the value -13.4 applies to the gray value of 50, and the values of 22.9 applies to the gray value of 100. Linear interpolation will be used in between. The 3rd parameter, a "1" indicates that one decimal place should be shown in the readout.

Finally, you may also supply labeling information about units and an optional prefix to be shown. For example:

50 100 80 100 0 50 40 200 values = -13.4, 22.9, 1, K, Temp=

Would result in a probe readout in the form: " Temp = -13.4 K"

You do not have to supply the values for the number of decimal places, units, or prefix on each line if they are identical to the previously specified values. See the second example, below.

Simple form example

Now, a couple of examples. First, is a simple form with multiple tables most likely used to enhance a background image (not overlays): # my enhancement file * gray scale 0 255 0 255 0 255 0 255 * inverse 0 255 255 0 255 0 255 0 * strech 0 50 0 0 0 0 0 0 51 200 0 255 0 255 0 255 201 255 255 255 255 255 255 255 * fixed breakpoints 0 50 0 50 0 50 0 50 51 55 100 100 0 0 0 0 56 60 0 0 100 100 0 0 61 200 100 200 100 200 80 100 201 255 200 255 0 0 200 255

Complex form example

Now for a more complex example, used with the "probe" control and to colorize overlays automaticallys (see the "overlay_enhance_table" parameter). Note that in each table, the lower range of gray values is used for one parameter, while the upper range is used for a different one....

*GDLI8 0 1 0 0 0 0 0 0 value=25., 24.8,1,K,LI= 2 123 60 215 40 165 10 115 value=24.60,0.28 124 143 128 63 128 63 255 106 value=0.08, -3.74 144 163 100 233 100 233 0 0 value=-3.94, -7.76 164 183 255 120 0 0 0 0 value=-7.97, -11.78 184 195 80 80 0 0 0 0 value = -12.0, -14.20 196 199 0 0 0 0 0 0 value=-14.4, -15.0 200 214 110 128 110 128 110 128 value=301,273.6,1,K,CTT= 215 230 148 170 148 170 148 170 value=271.55,242.09 231 240 190 220 190 220 190 220 value=240.13,222.45 241 255 255 255 255 255 255 255 value=220.49, 193.0 * GDPWI 0 1 0 0 0 0 0 0 value=0,.336,1,mm,TPW= 2 29 60 217 40 167 10 117 value=.673, 9.764 30 59 150 80 150 80 250 150 value= 10.1, 19.86 60 89 0 115 100 165 100 40 value=20.0, 29.965 90 119 145 255 190 255 60 0 value=30.30, 40.065 120 149 255 150 130 40 100 40 value=40.0, 50.165 150 179 100 240 0 0 100 240 value=50.50, 60.267 180 199 255 225 200 180 255 225 value = 60.603, 67.0 200 214 110 128 110 128 110 128 value=301,273.6,1,K,CTT= 215 230 148 170 148 170 148 170 value=271.55,242.09 231 240 190 220 190 220 190 220 value=240.13,222.45 241 255 255 255 255 255 255 255 value=220.49, 193.0


Return to the FlAniS homepage