Description

Smooth-out the outline of all sub-regions and holes

Return Type

None  

Syntax

object.FilterOutlines FilterSize

The FilterOutlines Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McRegions.
FilterSizeRequired. A Long value.

Averaging array size, in pixels. A running average of boundary vertices is made using this number of pixels. If the size is negative 1, then the convex hull replaces the boundary. If it is less than negative 1 then a filtering using an average of -FilterSize-1 is done before the convex hull is computed.

Remarks

The smoothing is done on verticies adjusted to their closest integral pixel position and the resulting vertices are also always placed on pixel centers. Thus, the method is most useful for regions that have been created from bit mask data via the McFeatures.SetFromMask method or via the Threshold property.

The filtering is done in such a way that the area of the boundary is preserved.

All region features (sub-regions) are filtered by this method. If you only want to filter one feature boundary, use McFeatures.GetFeaturePointsEx to get the filtered boundary and then McFeatures.SetFeaturePoints to set the new boundary to your filtered result.

Features with the mcftEllipseAny or mcftRectangleAny bits set in their McFeatures.Type will not be filtered.