| Customize Help

Displaying multiple buffers

You can view one image buffer at a time in a display, but you can view multiple image buffers using multiple displays. Select the image buffers to different displays, using MdispSelect().

Using multiple windowed displays, you can view more than one buffer at the same time on the Windows desktop screen(s).

For exclusive displays, you can have as many displays as you have appropriate screens; however, you can have only one display at a time on a given screen. To view more than one image at a time in one display, use child buffers. For example, you can display the source and destination images of an operation, using the following steps:

  1. Allocate a large displayable image buffer (big enough to contain the source and destination images) using MbufAlloc2d() or MbufAllocColor(). This buffer will be known as the parent buffer.

  2. Allocate two non-overlapping child buffers within it, using MbufChild2d() or MbufChildColor().

  3. Select the parent buffer for display using MdispSelect().

  4. Use one of the child buffers as the source image buffer and the other as a destination image buffer of the operation.

The following example shows how to display multiple image buffers in a single display. The source image, Bird.mim, is loaded into a child of a displayable image buffer and then used as the source of an image processing operation (increasing the image luminance). The result is stored in the other child of the same image displayable buffer.

For MIL-Lite, the luminance operation is not performed; the image is merely copied from the left child buffer to the right.