Available in LEADTOOLS Medical Imaging toolkits. |
LImageViewer::GetDefaultWindowLevelValues
#include "ltwrappr.h"
L_INT LImageViewer::GetDefaultWindowLevelValues(nCellIndex, nSubCellIndex, pnWidth, pnCenter, uFlags)
L_INT nCellIndex; |
/* index of a cell */ |
L_INT nSubCellIndex; |
/* index into the image list attached to the cell */ |
L_INT * pnWidth; |
/* pointer to a variable to be updated */ |
L_INT * pnCenter; |
/* pointer to a variable to be updated */ |
L_UINT uFlags; |
/* reserved for future use */ |
Gets the window level default values that are set when loading the image.
Parameter |
Description |
nCellIndex |
A zero-based index of the cell that contains the sub-cell for which the default window level values are being retrieved. |
nSubCellIndex |
A zero-based index into the image list attached to the cell specified in nCellIndex. This image contains the default window level values being retrieved. Pass -2 to retrieves the default window level values of the selected sub-cell. |
pnWidth |
Address of the variable to be updated with the default window level width value. |
pnCenter |
Address of the variable to be updated with the default window level center value. |
uFlags |
Reserved for future use. Pass 0. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function will not get the current window level values. To get the current window level values call LImageViewer::GetActionProperties. To set the current window level values call LImageViewer::SetActionProperties
This function will not get the current window level values; it will get the default ones. The default values can be set using either by using LImageViewer::SetDefaultWindowLevelValues or can be internally calculated when the images are first set in the control using either LImageViewer::SetCellBitmapList or LImageViewer::SetRequestedImage (when the low memory usage feature is enabled). For more information about the low memory usage feature, refer to the function LImageViewer::EnableCellLowMemoryUsage.
To reset the window level values to the default values use the function LImageViewer::ResetWindowLevelValues.
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
This examples changes the default window level value by decrease the width by 100. Then resets the images based on the new value.
L_INT LImageViewer_GetDefaultWindowLevelExamples(LImageViewer& ImageViewer) { L_INT nRet; L_INT nWidth; L_INT nCenter; nRet = ImageViewer.GetDefaultWindowLevelValues( 0, 0, &nWidth, &nCenter, 0); if (nRet != SUCCESS) return nRet; nWidth -= 100; nRet = ImageViewer.SetDefaultWindowLevelValues( 0, 0, nWidth, nCenter, 0); if (nRet != SUCCESS) return nRet; nRet = ImageViewer.ResetWindowLevelValues( 0, 0, 0); if (nRet != SUCCESS) return nRet; return SUCCESS; }