#include "ltwrappr.h"
virtual L_INT LBitmap::FreeKmeansOutput(pOutCenters)
L_COLORREF* pOutCenters; |
pointer to kmeans generated clusters |
Frees the data generated by the LBitmap::KMeansBitmapSegmentation function.
| Parameter | Description | |
| pOutCenters | Pointer to the data generated by the LBitmap::KMeansBitmapSegmentation function. | |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Use this function to free the data generated by the LBitmap::KMeansBitmapSegmentation function.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
L_INT LBitmap__FreeKmeansOutputExample(){L_INT nRet;LBitmap LeadBitmap;nRet =LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("Clean.tif")), 0, ORDER_BGRORGRAY);if(nRet !=SUCCESS)return nRet;L_UINT nCluster = 4;L_COLORREF OutCenter = (L_COLORREF) RGB(25,50,70);L_COLORREF* pOutCenters = &OutCenter;L_INT nOutCentersCount = -1;nRet = LeadBitmap.KMeansBitmapSegmentation(nCluster, &pOutCenters, &nOutCentersCount, NULL, KMEANS_RANDOM);if(nRet != SUCCESS)return nRet;//free the pOutCenters dataLeadBitmap.FreeKmeansOutput(pOutCenters);nRet = LeadBitmap.Save (MAKE_IMAGE_PATH(TEXT("Result.BMP")), FILE_BMP, 24, 0, NULL);if(nRet !=SUCCESS)return nRet;pBITMAPHANDLE pBitmapHandle = LeadBitmap.GetHandle();//free bitmapif(pBitmapHandle->Flags.Allocated)L_FreeBitmap(pBitmapHandle);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
