LBitmap::GetRgnPerimeterLength

#include "ltwrappr.h"

virtual L_INT LBitmap::GetRgnPerimeterLength (pXForm, puLength, uFlags = 0)

pRGNXFORM pXForm;

pointer to a coordinate-translation structure

L_SIZE_T * puLength;

pointer to a variable to be updated

L_UINT32 uFlags;

flags

Computes the length of the perimeter of a region.

Parameter

Description

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.

puLength

Address of a variable to be updated with the perimeter length of the region. The length is expressed in pixels.

uFlags

Reserved for future use. Must be 0.

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 LBase::EnableStatusCallback.

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

LTIMGEFX

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

Win32, x64.

See Also

Functions:

LBitmap::AddShadow, LBitmap::AllocFTArray, LBitmap::ChangeHueSatInt, LBitmap::ColorReplace, LBitmap::ColorThreshold, LBitmap::DFT, LBitmap::DirectionEdgeStatistical, LBitmap::FFT, LBitmap::FreeFTArray, LBitmap::FrqFilter, LBitmap::FrqFilterMask, LBitmap::FTDisplay, LBitmap::GetStatisticsInfo, LBitmap::GetFeretsDiameter, LBitmap::GetObjectInfo, LBitmap::GetRgnContourPoints, LBitmap::MathFunction, LBitmap::RevEffect, LBitmap::Segment, LBitmap::SubtractBackground, LBitmap::UserFilter, LBitmap::DirectionEdgeStatistical2

Topics:

Working with the Existing Bitmap Region

 

Raster Image Functions: Creating and Using a Region

 

Raster Image Functions: Analysis: Object or Region Analysis

Example

L_INT LBitmap__GetRgnPerimeterLengthExample(LBitmap *pLeadBitmap)  
 
{ 
   L_INT nRet; 
   RECT   rcRect;  
   L_SIZE_T    uPerimeter;  
 
   rcRect.top = pLeadBitmap->GetHeight ()/3;  
   rcRect.bottom = pLeadBitmap->GetHeight ()*2/3;  
   rcRect.left = pLeadBitmap->GetWidth ()/3;  
   rcRect.right = pLeadBitmap->GetWidth ()*2/3;  
    
   nRet =pLeadBitmap->Region()->SetRgnEllipse (&rcRect); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =pLeadBitmap->GetRgnPerimeterLength(NULL, &uPerimeter); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 20.0.2019.9.23
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help