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 (pseudo-color 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 floating-point LUT buffer. Note, if the given parameters cause an overflow or underflow, indeterminate results will be written in the destination LUT.
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 multi-band 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 3-band, unsigned or floating-point 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 . (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EXP |
Uses the following formula for calculation: a bx + 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_SIN |
Uses the following formula for calculation: a sin (b x) + c . (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TAN |
Uses the following formula for calculation: a tan (b x) + c . (more details...) |
To fill the LUT with a colormap (pseudo-color palette), set this parameter to one of the following:
For specifying a colormap
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_COLORMAP_HOT |
Fills the LUT buffer with a hot colormap. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COLORMAP_HUE |
Fills the LUT buffer with a hue colormap. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COLORMAP_JET |
Fills the LUT buffer with a jet colormap. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COLORMAP_SPECTRUM |
Fills the LUT buffer with a spectrum colormap. (more details...) |
Specifies the constant a for the specified mathematical function, if applicable. If filling the LUT with a colormap, set this to M_DEFAULT.
For specifying the first
constant
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that this parameter is not used. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the first constant's value. |
Specifies the constant b for the specified mathematical function, if applicable. If filling the LUT with a colormap, set this to M_DEFAULT.
For specifying the second
constant
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that this parameter is not used. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the second constant's value. |
Specifies the constant c for the specified mathematical function, if applicable. If filling the LUT with a colormap, set this to M_DEFAULT.
For specifying the third
constant
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that this parameter is not used. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the third constant's 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); this setting is only applicable to colormaps, and is the only possible option. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
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.
For specifying the initial x
value
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that this parameter is not used. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the first x value to use during calculation. |
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 -1 |
Specifies the last index entry to affect. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |