L_GetLinearVOILUT

Summary

Gets the window center and the window width, if the LUT stored inside pBitmap is linear. If the LUT stored inside pBitmap is not linear, the function will fail.

Syntax

#include "l_bitmap.h"

L_LTIMGCOR_API L_INT L_GetLinearVOILUT(pBitmap, pCenter, pWidth, uFlags);

Parameters

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle referencing the bitmap.

L_DOUBLE *pCenter

Pointer to a variable to be updated with the center of the range of color intensities that define your window of interest, if the LUT is linear. Cannot be NULL.

L_DOUBLE *pWidth

Pointer to a variable to be updated with the range of color intensities that define your window of interest, if the LUT is linear. Cannot be NULL.

L_UINT uFlags

Reserved for future use. Pass 0 for now.

Returns

Value Meaning
SUCCESS LUT is Linear (success).
0 LUT is not linear (fail).
<0 An error occurred. Refer to Return Codes.

Comments

You have to pay attention to your signed images LUT. The upper half should contain negative values and lower half contains positive values.

This function supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available in the Document and Medical Imaging toolkits.

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.

See Also

Functions

Topics

Example

Check the linearity of the LUT and computes its window width and center by using L_GetLinearVOILUT function.

L_INT GetLinearVOILUTExample(pBITMAPHANDLE pBitmap, L_DOUBLE * pCenter, L_DOUBLE * pWidth) 
{ 
   return L_GetLinearVOILUT(pBitmap, pCenter, pWidth, 0); 
} 

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.