MdispLut()函数

Synopsis

Copy a LUT buffer to a display output LUT.

Format

void MdispLut(DisplayId, LutBufId)

MIL_ID DisplayId; Display identifier
MIL_ID LutBufId; LUT buffer identifier

Description

This function copies a LUT buffer to the specified display output LUT. The LUT buffer contents are loaded into the physical output LUT. MIL checks the target display to determine whether or not a LUT is supported. If not, an error is generated.

The DisplayId parameter specifies the identifier of the display to which the LUT buffer is copied.

The LutBufId parameter specifies the identifier of a previously allocated LUT buffer (with an M_LUT attribute). The LUT buffer can be the default LUT (M_DEFAULT), the pseudo LUT (M_PSEUDO), or a custom LUT buffer:

  • The default LUT (M_DEFAULT)

If you set LutBufId to M_DEFAULT, a default LUT is copied to the display LUT. MdispLut uses the display depth to determine the number of entries required for the default LUT. It loads this LUT with a ramp that uses the full range of intensities available on the display. This creates a pass-through (transparent) LUT.

When displaying an image buffer, the same default LUT values are loaded into each available output channel LUT.

  • A pseudo-color LUT (M_PSEUDO)

If you set LutBufId to M_PSEUDO, a pseudo-color LUT is copied to the display LUT (if supported by your hardware). MdispLut uses the display depth to determine the number of entries required for the LUT. This can be used to display a monochrome image in color.

  • A custom LUT buffer identifier

You can copy a custom LUT (allocated with MbufAlloc1d or MbufAllocColor) to the display LUT by setting LutBufId to the LUT’s buffer identifier (a buffer having the M_LUT attribute). If you associate a one-band LUT buffer to a display and display a one-band image (MdispSelect), the same data is loaded in each output channel LUT (if a different LUT is available for each display output channel of your system’s display), and the same data is routed to each output channel LUT. This produces a monochromatic effect.

If you copy a three-band color LUT buffer (RGB) to a display and you display a one-band image (monochrome), each LUT buffer color band is loaded in a different output channel LUT (if a different LUT is available for each display output channel of your system’s display). However, the same image data is sent to each LUT; this produces a pseudo-color effect on the display.

If you copy a one-band LUT buffer to a display and you display a three-band color image, the same LUT buffer data is loaded in each of the available output channel LUTs. Although the same LUT values are used, you obtain a true color effect because each image color band does not typically contain the same data. Finally, as is expected, associating a three-band color LUT to a display and displaying a three-band color image produces a true-color effect upon display.

Status

Current limitations:

  • The number of LUT buffer entries must be the same as the maximum number of intensities that can be represented in the display. In addition, the depth of the LUT buffer data must be the same as the physical display output LUTs.

Hardware limitations:

  • Some hardware systems do not support display LUTs.

See also

MbufAlloc1d, MbufAllocColor, MgenLutRamp, MgenLutFunction, MbufPut, MbufPut1d

《MdispLut()函数》上有1条评论

评论已关闭。