L_ApplyLinearModalityLUT

#include "l_bitmap.h"

L_LTIMGCOR_API L_INT L_ApplyLinearModalityLUT (pBitmap, fIntercept, fSlope, uFlags)

Remaps the bitmap pixels by applying a linear transformation described by a rescale slope and an intercept.

Parameters

pBITMAPHANDLE pBitmap

Pointer to the main bitmap handle.

L_DOUBLE fIntercept

Rescale intercept.

L_DOUBLE fSlope

Rescale slope.

L_UINT uFlags

A flag that determine the behavior of the function, the user can use one or more flags of the following:

Flags Meaning
M_LUT_SIGNED [0x0001] The LUT entries are signed
M_LUT_UPDATE_MIN_MAX [0x0002] Update MinVal,MaxVal inside the bitmap handle
M_LUT_USE_FULL_RANGE [0x0004] Do not mask the values in the LUT
M_LUT_ALLOW_RANGE_EXPANSION [0x0008] Allow the function to increase pBitmap->HighBit (if needed) to be able to hold the data range after applying modality LUT.

Returns

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

Comments

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

Platforms

Win32, x64, Linux.

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

LEADTOOLS Raster Imaging C API Help