The WINDOWLEVELDLGPARAMS structure provides information needed to the L_DlgWindowLevel function.
typedef struct _WINDOWLEVELDLGPARAMS
{
L_UINT uStructSize ;
pBITMAPHANDLE pBitmap ;
L_BOOL bZoomToFit;
L_RGBQUAD * pLUT ;
L_UINT32 uLUTLength ;
L_UINT uLowBit ;
L_UINT uHighBit ;
L_INT nLow ;
L_INT nHigh ;
COLORREF crStart ;
COLORREF crEnd ;
L_INT nFactor ;
L_UINT32 uWindowLevelFlags;
L_UINT32 uDlgFlags ;
LTCOMMDLGHELPCB pfnHelpCallback;
L_VOID *pHelpCallBackUserData;
} WINDOWLEVELDLGPARAMS,* LPWINDOWLEVELDLGPARAMS;
Size of this structure, in bytes. Use the sizeof operator to calculate this value.
Pointer to the bitmap handle that references the bitmap used for preview or processing.
Flag that indicates the initial zoom level for previewing the image. Possible values are:
Value | Meaning |
---|---|
TRUE | Set the initial zoom level to "Zoom to fit". |
FALSE | Set the initial zoom level to "Normal (1:1)". |
Pointer to the look-up table, which will be filled by the dialog.
Length of the look-up table.
Value indicating the low bit used for leveling.
Value indicating the high bit used for leveling.
Variable to be updated with the low value entered through the dialog.
Variable to be updated with the high value entered through the dialog.
Variable to be updated with the starting color value entered through the dialog.
Variable to be updated with the ending color value entered through the dialog.
Value that indicates the factor to be applied in the function operation specified in the uWindowLevelFlags parameter. This parameter is used only if uWindowLevelFlags is FILLLUT_EXPONENTIAL, FILLLUT_LOGARITHMIC or FILLLUT_SIGMOID. If FILLLUT_EXPONENTIAL or FILLLUT_SIGMOID flag is selected its value range from 1000 to -1000. If FILLLUT_LOGARITHMIC flag is selected its value range form 0 to 1000. If nFactor = 0, the lookup table will be filled linearly.
Flags that indicate how the range is used to fill the LUT and the type of LUT.
Value | Meaning |
---|---|
How the range is used to fill the LUT | |
FILLLUT_INSIDE | [0x0001] Fill the LUT between nLow and nHigh. ( inside the nLow...nHigh range ) |
FILLLUT_OUTSIDE | [0x0002] Fill the LUT below nLow and above nHigh. ( outside the nLow...nHigh range ) |
LUT type | |
FILLLUT_LINEAR | [0x0010] LUT is linear. |
FILLLUT_EXPONENTIAL | [0x0020] LUT is exponential. |
FILLLUT_LOGARITHMIC | [0x0030] LUT is logarithmic. |
FILLLUT_SIGMOID | [0x0040] LUT is sigmoid. |
User interface flags for this dialog which determines the layout and action of the dialog. Possible values are:
Value | Meaning |
---|---|
DLG_WINDOWLEVEL_AUTOPROCESS | [0x00000001] process the image on OK. You should pass a valid bitmap in the pBitmap field of this structure. |
DLG_WINDOWLEVEL_SHOW_CONTEXTHELP | [0x00000002] dialog should contain context sensitive help icon. |
DLG_WINDOWLEVEL_SHOW_PREVIEW | [0x00000004] show preview of the image in the dialog. You should pass a valid bitmap in the pBitmap field of this structure. |
DLG_WINDOWLEVEL_SHOW_TOOL_ZOOMLEVEL | [0x00000008] show the "Zoom to fit" and "Zoom Normal" toolbar buttons. The DLG_HUE_SHOW_PREVIEW flag must be set in order to show these buttons. |
DLG_WINDOWLEVEL_SHOW_RANGE | [0x00000010] show the Range combo in the dialog. |
Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.
Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.