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.
Amount of contrast enhancement.
Number of levels used in edge enhancement.
Degree of edge enhancement.
Number of levels used in latitude reduction.
Degree of latitude reduction.
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.
Multiscale Enhancement Function - Before
Multiscale Enhancement Function - After
View additional platform support for this Multiscale Enhancement function.
Win32, x64, Linux.
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
if (LeadBitmap.Flags.Allocated)
L_FreeBitmap(&LeadBitmap);
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document