/* * L U T . H -- Look up table headers etc * * Written David Burgess * Image Recognition Systems * 720 Birchwood Boulevard * Birchwood Science Park * Warrington * Cheshire * WA3 7PX * * Copyright (c) and intellectual property rights Image Recognition Systems * * Date: 30th January 1990 * * Modifications * * 03-10-94 jimp Added a definition of look_up_table * */ /* * LUT types */ #define UNDEF_LUT 0 #define BRIGHT_LUT 1 #define FLUOR_LUT 2 #define SPEC_LUT 3 /* * LUT file header info. */ #define LUT_MAGIC 19540 #define LUT_VSN 1 /* * Status bit definitions */ #define EXACT 1 /* b0 LUT is exactly calculated */ #define FREEHAND 2 /* b1 LUT has been altered by freehand */ #define INVERT 4 /* b2 LUT is inverted */ #define CSTEPMASK 0xf0 /* Calc. step value b4, b5, b6, b7 */ /* * Data type - shouldn't be here */ #define UBYTE unsigned char struct lut_assoc { /* Application info. associated with LUT */ int type; /* Type of correction this LUT represents */ int status; /* Current LUT status (see above) */ float gamma; /* Gamma val for initial LUT calculation */ struct look_up_table *lut; /* Pointer to the LUT */ struct lut_assoc *next; /* Pointer to next in linked list */ }; struct look_up_table { UBYTE red_lut[256]; UBYTE green_lut[256]; UBYTE blue_lut[256]; }; struct rgb { UBYTE red, green, blue; };