Table:  For specifying the mathematical function 
Table:  For specifying a colormap 
+ combination:  For specifying to replace the colormap's first and/or last gray value 
Table:  For specifying the third constant 
Table:  For specifying the first index 
Table:  For specifying the last index 
MIL_ID LutBufId,  //in 
MIL_INT Func,  //in 
MIL_DOUBLE a,  //in 
MIL_DOUBLE b,  //in 
MIL_DOUBLE c,  //in 
MIL_INT StartIndex,  //in 
MIL_DOUBLE StartXValue,  //in 
MIL_INT EndIndex  //in 
This function generates a value for each LUT index according to the specified mathematical function or colormap (pseudocolor palette).
When generating values based on a mathematical function, you can limit generation to a specified range of LUT indices (StartIndex to EndIndex inclusive). The supported mathematical functions take a single variable (x). The StartXValue parameter specifies the initial x value. The remaining entries of the index range are generated by incrementing the value of x by 1 for each index. All results are converted to integer by truncation, except when using a floatingpoint LUT buffer. Note, if the given parameters cause an overflow or underflow, indeterminate results will be written in the destination LUT.
When generating a colormap LUT, you can specify a replacement value for the color assigned to index 0 of the LUT and for the color assigned to the highest index of the LUT (M_FIRST_GRAY and M_LAST_GRAY, respectively). This helps to highlight invalid pixels when working with images produced from cameras or 3D sensors that set such pixels to 0 or to the highest possible intensity value.
Specifies the identifier of the LUT in which to generate values. This parameter must be given a valid LUT buffer identifier, allocated using MbufAlloc1d() or MbufAllocColor() with M_LUT. If the LUT is a multiband LUT (allocated with MbufAllocColor()), the same data is written to all bands, except when filling the LUT buffer with a colormap. For a LUT buffer allocated with MbufAllocColor(), the buffer height (SizeY parameter) must have been set to a value of 1.
When filling the LUT buffer with a colormap, the buffer must be a 3band, unsigned or floatingpoint LUT buffer.
Specifies the mathematical function or colormap to use for calculations.
To fill the LUT using a mathematical function, set this parameter to one of the following:
For specifying the mathematical function


Value  Description  
M_COS 
Uses the following formula for calculation: a cos (b x) + c . 

M_EXP 
Uses the following formula for calculation: a b^{x} + c . 

M_LOG 
Uses the following formula for calculation: a log _{b} (x) + c . 

M_POWER 
Uses the following formula for calculation: a x ^{b} + c . 

M_QUAD 
Uses the following formula for calculation: a x ^{2} + b x + c . 

M_SIGMOID 
Uses the following formula for calculation: b + ((c  b) / (1 + e^{ a x} )) . 

M_SIN 
Uses the following formula for calculation: a sin (b x) + c . 

M_TAN 
Uses the following formula for calculation: a tan (b x) + c . 

M_TONE_MAPPING 
Uses the following formula for calculation. 
To fill the LUT with a colormap (pseudocolor palette), set this parameter to one of the following:
For specifying a colormap


Value  Description  
M_COLORMAP_DISTINCT_256 + 
Fills the LUT buffer with a distinct colormap. 

M_COLORMAP_HOT + 
Fills the LUT buffer with a hot colormap. 

M_COLORMAP_HUE + 
Fills the LUT buffer with a hue colormap. 

M_COLORMAP_JET + 
Fills the LUT buffer with a jet colormap. 

M_COLORMAP_SPECTRUM + 
Fills the LUT buffer with a spectrum colormap. 

M_COLORMAP_TURBO + 
Fills the LUT buffer with a turbo colormap. 
You can add one or more of the following values to the abovementioned values to specify a replacement value for the color assigned to index 0 of the LUT and/or that assigned to the highest index of the LUT.
For specifying to replace the colormap's first and/or
last gray value


Combination value  Description  
M_FIRST_GRAY 
Specifies to replace the value for the color assigned to index 0 of the LUT with the value specified with the a parameter. 

M_LAST_GRAY 
Specifies to replace the value for the color assigned to the highest index of the LUT with the value specified with the b parameter. 
Specifies the constant a for the specified mathematical function, or specifies a replacement value for the color assigned to index 0 of the LUT, if filling the LUT with a colormap.
For specifying the first constant or color
replacement value


Value  Description  
M_DEFAULT 
Specifies that this parameter is not used. 

Specifies an RGB color replacement value. 

Parameters  
Specifies the red component, as a value between 0 and 255. 

Specifies the green component, as a value between 0 and 255. 

Specifies the blue component, as a value between 0 and 255. 

Value 
Specifies the first constant's value, or specifies the color replacement value. 
Specifies the constant b for the specified mathematical function, or specifies a replacement value for the color assigned to the highest index of the LUT, if filling the LUT with a colormap.
For specifying the second constant or color
replacement value


Value  Description  
M_DEFAULT 
Specifies that this parameter is not used. 

Specifies an RGB color replacement value. 

Parameters  
Specifies the red component, as a value between 0 and 255. 

Specifies the green component, as a value between 0 and 255. 

Specifies the blue component, as a value between 0 and 255. 

Value 
Specifies the second constant's value, or specifies the color replacement value. 
Specifies the first LUT index entry for which to generate values.
For specifying the first index


Value  Description  
M_DEFAULT 
Specifies the first index entry of the LUT (index 0). 

0 < = Value < LUT size 
Specifies the first index entry to affect. 
Specifies the initial value of x in the mathematical function. If filling the LUT with a colormap, set this to M_DEFAULT.
Specifies the last LUT index entry for which to generate values.
For specifying the last index


Value  Description  
M_DEFAULT 
Specifies the last index entry of the LUT; this setting is only applicable to colormaps, and is the only possible option. 

StartIndex <= Value < LUT size 
Specifies the last index entry to affect. 
Header  Include mil.h. 
Library  Use mil.lib. 
DLL  Requires mil.dll. 