MgenLutRamp()函数

Synopsis

Generate ramp data into a LUT buffer.

Format

void MgenLutRamp(LutId, StartIndex, StartValue, EndIndex, EndValue)

MIL_ID LutId; LUT identifier
long StartIndex; First LUT index
double StartValue; Start value of input range
long EndIndex; Last LUT index
double EndValue; End value of input range

Description

This function generates a ramp, inverse ramp, or a constant in the specified LUT buffer region (StartIndex to EndIndex). The increment between LUT entries is the difference between StartValue and EndValue, divided by the number of entries.

If you need to generate a more complex LUT, use MgenLutFunction or generate the values with your Host system and load them into a MIL LUT buffer, using MbufPut1d or MbufPutColor.

The LutId parameter specifies the identifier of the LUT in which to generate values. This parameter must be given a valid LUT buffer identifier. Allocate a LUT buffer, using?MbufAlloc1d or MbufAllocColor.

The StartIndex and EndIndex parameters specify the first and last LUT index entry for which to generate values. StartIndex must be less than or equal to EndIndex.

The StartValue and EndValue parameters specify the extreme values from which the increment is calculated. StartValue is the first LUT entry. If both values are the same, the entire LUT range is filled with this value. If EndValue is smaller than StartValue, an inverse ramp is generated. These parameters accept only integer values, except when using a floating-point LUT buffer.

See also

MgenLutFunction, MbufPut1d, MbufPutColor, MbufAlloc1d, MbufAllocColor

《MgenLutRamp()函数》上有31条评论

评论已关闭。