Enhances an image's 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.


#include "l_bitmap.h"

L_LTIMGCOR_API L_INT L_MultiScaleEnhancementBitmap (pBitmap, uContrast, uEdgeLevels, uEdgeCoeff, uLatitudeLevels, uLatitudeCoeff, uFlags)



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

Value that determines the type of filter that will be used when applying the MultiScale enhancement filter, one or more flags can be used. Possible values are:

Flags Meaning
MSE_GAUSSIAN [0x0000] Uses Gaussian filter.
MSE_RESAMPLE [0x0001] Uses Resample filter.
MSE_BICUBIC [0x0002] Uses Bicubic filter.
MSE_NORMAL [0x0003] Uses Normal filter.
MSE_EDGEENH [0x0010] Adds the latitude reduction option. When this flag is set, the uLatitudeLevels and uLatitudeCoeff parameters will be used.
MSE_LATRED [0x0020] Adds the edge enhancement option. When this flag is set, the uEdgeLevels and uEdgeCoeff properties will be used.
MSE_DONTUSE_MULTITHREADING [0x0040] Do not use multi-threading (Use this with single-core CPUs).
MSE_DEFAULT [-1] Use the default level value (which is 5).


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


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


Win32, x64, Linux.

See Also




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 (MAKE_IMAGE_PATH(TEXT("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(MAKE_IMAGE_PATH(TEXT("Result.BMP")), &LeadBitmap, FILE_BMP, 24, 0, NULL); 
   if(nRet !=SUCCESS) 
      return nRet; 
   //free bitmap  
   return SUCCESS; 

Help Version 22.0.2022.6.24
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.