Click or drag to resize

IMcFeaturesGetBounds Method

Returns the entire features' pixel bounds

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Sub GetBounds ( 
	<OutAttribute> ByRef left As Integer,
	<OutAttribute> ByRef top As Integer,
	<OutAttribute> ByRef right As Integer,
	<OutAttribute> ByRef bottom As Integer
)

Parameters

left
Type: SystemInt32
left side of the region
top
Type: SystemInt32
upper side of the region
right
Type: SystemInt32
right side of the region
bottom
Type: SystemInt32
bottom side of the region
Remarks
This method returns all of the features bounding box, rounded to the nearest integral pixel locations. Use the BoundingRect property or the GetFeatureBoundingBox method to access the bounds of individual features or to get the bounds to sub-pixel accuracy. This method returns its results as four separate values. The BoundingRect property exposes the bounds of all or selected features as a SINGLERECT, which may be more convenient in many situations. If this McFeatures is IsReset (as it was after it was first created and after a Reset call) or if the mcOptionFlags.mcofInvertFeatureMask OptionFlags bit is set, then the bounds returned will be that of a backing McImage (this is the bounds that AccessMaskedImageData will use for an IsReset McFeatures). Otherwise, if this McFeatures IsEmpty then left will be returned as greater than right, and top will be returned as less than bottom (an illegal bounds). If there are any features, then the smallest rectangular bounds enclosing all of the features, rounded to the nearest pixel, will be returned. In this case left will be less or equal to right, and top will be less or equal to bottom.
Examples
VB
Dim lft&, tp&, rgt&, bt&
McEngine.ActiveImage.RegionFeatures.GetBounds( lft, tp, rgt, bt)
if lft > rgt Then
MsgBox "RegionFeatures of the active image is empty."
End If
See Also