Look-Up Tables (LUT)

An LUT is a vector for the translation of pixel data.



make-equilevel-lut levels &optional (size 256) [function]

returns a one-dimensional integer-vector that linearly maps values between 0 and size into values between 0 and levels. For example, (make-equilevel-lut 3 12) returns #i(0 0 0 0 1 1 1 1 2 2 2 2).


look-up src dest lut [function]

translates values stored in src vector into dest vector using lut. If dest is nil, a vector of the same class and size as src is created. For example, (look-up #i(1 2 3) nil #(10 20 30 40 50)) returns #i(20 30 40).


look-up2 src dest lut1 lut2 [function]

Src and dest are integer-vector or byte-vector (string) of the same size. :Look-up2 translates src into dest looking-up lut1 and lut2 successively.


look-up* src dest luts [function]

luts is a list of look-up tables. src is translated into dest successively looking up look-up tables given in luts.


concatenate-lut lut1 lut2 &optional (size 256) [function]

concatenates two look-up tables lut1 and lut2, and returns a new look-up table which performs the same translation as lut1 and lut2 are looked-up successively.


*x-gray32-lut* [variable]

LUT to translate 32-level gray-scale into the pixel values in the default color map x:*colormap*. (aref *x-gray32-lut* n) returns the pixel value for nth gray-level out of 32 levels.


*x-gray16-lut* [variable]

LUT to translate 16-level gray-scale pixel into the index of x's default color map x:*colormap*.


*x-color-lut* [variable]

LUT for several vivid colors defined in x:*color-map*. Registered colors are "black", "red", "green", "lightblue", "yellow", "orange", "blue", "magenta", "white".


*256to8* [variable]

256-entry LUT to translate integers in range of 0..255 into 0..7. The levels are linearly mapped.


*256to16* [variable]

256-entry LUT to translate integers in range of 0..255 into 0..15. The levels are linearly mapped.


*256to32* [variable]

256-entry LUT to translate integers in range of 0..255 into 0..31. The levels are linearly mapped.


*gray32* [variable]

256-entry LUT to translate the raw gray-scale pixels into X's color map indices. This is made by concatenating two LUTs, *256to32* and *x-gray32-lut*. An Xwindow display-able pixel-image with 32 gray-levels can be obtained by translating the 256-level raw image by *gray32*.


*rainbow32* [variable]

256-entry LUT to translate 256-level hue values into into X's rainbow color map indices. This is made by concatenating two LUTs, *256to32* and *x-rainbow32-lut*.


k-okada 2013-05-21