Available in LEADTOOLS Medical Imaging toolkits. |
L_MultiScaleEnhancementBitmap
#include "l_bitmap.h"
L_LTIMGCOR_API L_INT L_MultiScaleEnhancementBitmap (pBitmap, uContrast, uEdgeLevels, uEdgeCoeff, uLatitudeLevels, uLatitudeCoeff, uFlags)
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle */ |
L_UINT uContrast; |
/* amount of contrast enhancement */ |
L_UINT uEdgeLevels; |
/* number of levels used in edge enhancement */ |
L_UINT uEdgeCoeff; |
/* degree of edge enhancement */ |
L_UINT uLatitudeLevels; |
/* number of levels used in latitude reduction */ |
L_UINT uLatitudeCoeff; |
/* degree of latitude reduction */ |
L_UINT uFlags; |
/* flags that determine function behavior */ |
Enhances an images contrast, edges, and density range for use in Computed Radiography (CR), in a way that all relevant image features are rendered with an appropriate level of visibility.
Parameter |
Description |
pBitmap |
Pointer to the bitmap handle. |
uContrast |
Amount of contrast enhancement. |
uEdgeLevels |
Number of levels used in edge enhancement. |
uEdgeCoeff |
Degree of edge enhancement. |
uLatitudeLevels |
Number of levels used in latitude reduction. |
uLatitudeCoeff |
Degree of latitude reduction. |
uFlags |
Reserved for future use. Must be 0. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Required DLLs and Libraries
LTIMGCOR For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 2000 / XP/Vista.
See Also
Example
This example loads a bitmap and applies multiscale enhancement.
L_INT MultiScaleEnhancementBitmapExample(L_VOID) { L_INT nRet; BITMAPHANDLE LeadBitmap; /* Bitmap handle to hold the loaded image. */ /* Load the bitmap, keeping the bits per pixel of the file */ nRet = L_LoadBitmap (TEXT("%UserProfile%\\My Documents\\LEADTOOLS Images\\IMAGE1.CMP"), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGRORGRAY, NULL, NULL); if(nRet !=SUCCESS) return nRet; // Apply multiscale enhancement nRet = L_MultiScaleEnhancementBitmap(&LeadBitmap, 2000, 4, MSE_DEFAULT , 0, 0, MSE_GAUSSIAN | MSE_EDGEENH); if(nRet !=SUCCESS) return nRet; nRet = L_SaveBitmap(TEXT("%UserProfile%\\My Documents\\LEADTOOLS Images\\Result.BMP"), &LeadBitmap, FILE_BMP, 24, 0, NULL); if(nRet !=SUCCESS) return nRet; //free bitmap if(LeadBitmap.Flags.Allocated) L_FreeBitmap(&LeadBitmap); return SUCCESS; }