#include "l_bitmap.h"
L_LTIMGCOR_API L_INT L_CountLUTColorsExt(pLUT, ulLLUTLen, pNumberOfEntries, pFirstIndex, uFlags);
Gets the total number of entries between the start color and the end color, and the index of the last occurrence of the start color. The start and end colors are determined internally.
Pointer to a lookup table.
LUT length.
Pointer to a variable to be updated with total number of entries in start to end color.
Pointer to a variable to be updated with index of the last occurrence of the start color.
Flag that indicates the LUT is belong to signed or unsigned image. Possible values are:
Value | Meaning |
---|---|
COUNT_LUT_UNSIGNED | [0x0001] Belong to signed image. |
COUNT_LUT_SIGNED | [0x0002] Belong to unsigned image. |
Value | Meaning |
---|---|
SUCCESS | LUT is Linear (success). |
FAILURE | LUT is not linear (fail). |
<0 | An error occurred. Refer to Return Codes. |
Suppose you have a LUT with 4096 colors, the first 200 colors are black and the last 30 are white, the rest of the colors between black and white are gray. This is what the function will provide:
pNumberOfEntries
: 3868pFirstIndex
: 199In more detail this is:
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.
Required DLLs and Libraries
Win32, x64, Linux.
Gets bitmap pLUT total number of entries in start to end colors and the index of the last occurrence of the start color.
L_INT CountLUTColorsExtExample(pBITMAPHANDLE pBitmap, L_UINT* pNumberOfEntries, L_INT* pFirstIndex)
{
return L_CountLUTColorsExt(pBitmap->pLUT16, pBitmap->LUTLength16, pNumberOfEntries, pFirstIndex, pBitmap->Flags.Signed? COUNT_LUT_SIGNED : COUNT_LUT_UNSIGNED);
}
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