Available in LEADTOOLS Medical Imaging toolkits. |
LImageViewer::SetRequestedImage
#include "ltwrappr.h"
L_INT LImageViewer::SetRequestedImage(nCellIndex, pBitmaps, pBitmapIndexes, nLength, uFlags)
L_INT nCellIndex; |
/* index of a cell */ |
pBITMAPHANDLE pBitmaps; |
/* pointer to bitmaps array */ |
L_INT * pBitmapIndexes; |
/* pointer to bitmap indexes array */ |
L_INT nLength; |
/* length of the bitmap indexes array */ |
L_UINT uFlags; |
/* reserved for future use */ |
Sends the requested images to the control; this function is used when the low memory usage feature is enabled (for more information see the LImageViewer::EnableCellLowMemoryUsage function).
Parameter |
Description |
|
nCellIndex |
A zero-based index of the cell for which to pass the requested image. |
|
pBitmaps |
Array of a BITMAPHANDLE structure that contains the requested frames. |
|
pBitmapIndexes |
Array of Integers containing the index of each bitmap in pBitmaps in respective manner. |
|
nLength |
Length of the pBitmapIndexes array. |
|
uFlags |
Flag that indicate how to handle the images set. Possible values are: |
|
|
Value |
Meaning |
|
CONTAINER_SETIMAGE_INSERT |
[0x00000000] Insert the requested image. This is the default value. |
|
CONTAINER_SETIMAGE_REPLACE |
[0x00000001] Replace the requested image with the corresponding index. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The low memory usage feature works by stopping the control from loading all the frames at runtime. Instead, the control will load only the frames that are currently visible on the cell. The control will send a request each time the user scrolls down or up, changes the number of visible framesetc. For example, suppose the cell layout is a 2X2 (See LImageViewer::SetCellProperties), and the user needs to load more than 100000 frames. The control will not load them all. This function will send a callback (LImageViewer::LowMemoryUsageCallBack) when the cell is loaded requesting 4 frames (1, 2, 3 and 4) (because the cell is 2X2). Once the user scrolls down the cell to show frame number 5, frame number 1 will be disposed of because it is no longer visible, and the callback will be fired to request frame number 5. When frames are requested, the user is supposed to send them to the control using the LImageViewer::SetRequestedImage function.
For the callback, use the LImageViewer::LowMemoryUsageCallBack function, to use this callback, it must first be set by calling LImageViewer::EnableLowMemoryUsageCallBack function.
Required DLLs and Libraries
LTIVW For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Example
For an example, refer to LImageViewer::EnableLowMemoryUsageCallBack.