Start » Filter Reference » Region » Region Features » RegionBoundingRectangle

RegionBoundingRectangle


Module: FoundationBasic

Computes the smallest rectangle containing a region.

Name Type Description
Input value
inRegion Region Input region
Input value
inBoundingRectangleFeature BoundingRectangleFeature Determines what kind of bounding rectangle will be computed
Input value
inReferenceAngle Real The middle angle of the valid range of the output rectangle's angle
Input value
inRectangleOrientation RectangleOrientation Orientation of the output rectangle
Output value
outBoundingRectangle Rectangle2D The smallest bounding rectangle of the input region
Output value
outCenter Point2D Center of the bounding rectangle
Output value
outLongSide Real Length of the bounding rectangle long side
Output value
outShortSide Real Length of the bounding rectangle short side

Description

The filter computes a rectangle with the smallest possible selected feature that contains all pixels belonging to the input region. The angle of the resulting rectangle is then normalized as in the NormalizeRectangleOrientation filter.

Hints

  • If the input region is not guaranteed to be non-empty, precede this filter with SkipEmptyRegion.

Examples

RegionBoundingRectangle performed on a sample region with inRectangleOrientation set on Vertical.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Empty region on input in RegionBoundingRectangle.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of RegionBoundingRectangle filter group.

See Also