L_GetRgnContourPoints

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_GetRgnContourPoints (pBitmap pXForm, ppPoints, puSize)

pBITMAPHANDLE pBitmap;

/* pointer to the bitmap handle */

pRGNXFORM pXForm;

/* pointer to a coordinate-translation structure */

POINT L_FAR * L_FAR * ppPoints;

/* pointer to a pointer */

L_UINT L_FAR * puSize;

/* pointer to a variable to be updated */

Returns the contour coordinates of a region.

Parameter

Description

pBitmap

Pointer to the bitmap handle.

pXForm

Pointer to an RGNXFORM structure that LEADTOOLS uses to translate between display coordinates and bitmap coordinates.

 

If you specify NULL in this parameter, the scalar fields default to 1, the offsets default to 0, and the view perspective defaults to the bitmap's view perspective.

ppPoints

Pointer to a pointer to be updated with an array that contains the coordinate points of the contour for the specified region. A memory buffer for this array is allocated by the function. When the array is no longer needed, the user should free it by calling the GlobalFreePtr macro.

puSize

Address of a variable to be updated with the number of points in the buffer.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function works only on bitmaps having a region. If a bitmap does not have a region the function returns the error: Not Initialized.

To update a status bar or detect a user interrupt during execution of this function, refer to L_SetStatusCallback.

This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This function supports signed data images.

Required DLLs and Libraries

LTIMG

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP.

See Also

Functions:

L_AddShadowBitmap, L_AllocFTArray, L_ChangeHueSatIntBitmap, L_ColorReplaceBitmap, L_ColorThresholdBitmap, L_DFTBitmap, L_DirectionEdgeStatisticalBitmap, L_FFTBitmap, L_FreeFTArray, L_FrqFilterBitmap, L_FrqFilterMaskBitmap, L_FTDisplayBitmap, L_GetBitmapStatisticsInfo, L_GetFeretsDiameter, L_GetObjectInfo, L_GetRgnPerimeterLength, L_MathFunctionBitmap, L_RevEffectBitmap, L_SegmentBitmap, L_SubtractBackgroundBitmap, L_UserFilterBitmap

Topics:

Raster Image Functions: Creating and Using a Region

 

Raster Image Functions: Analysis Image Object or Region Analysis

Example

BITMAPHANDLE LeadBitmap;   /* Bitmap handle for the image */
RECT rcRect; 
POINT L_FAR * pPoints; 
L_UINT uSize; 
/* Load a bitmap at its own bits per pixel */
L_LoadBitmap
 (TEXT("image3.cmp"), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL); 
rcRect.top = LeadBitmap.Height/3; 
rcRect.bottom = LeadBitmap.Height*2/3; 
rcRect.left = LeadBitmap.Width/3; 
rcRect.right = LeadBitmap.Width*2/3; 
L_SetBitmapRgnEllipse
 (&LeadBitmap, NULL, &rcRect, L_RGN_SET); 
L_GetRgnContourPoints
 (&LeadBitmap, NULL, &pPoints, &uSize);