Start » Filter Reference » Region » Region Basics » CreatePolygonRegion

CreatePolygonRegion


Module: FoundationLite

Creates a polygonal region corresponding to a given closed path.

Name Type Range Description
Input value
inPolygon Path
Input value
inPolygonAlignment CoordinateSystem2D* Adjusts the polygon to the position of the inspected object
Input value
inFrameWidth Integer 0 - 65535 Width of the created region's frame
Input value
inFrameHeight Integer 0 - 65535 Height of the created region's frame
Output value
outRegion Region Output region
Output value
outAlignedPolygon Path The input polygon transformed to the absolute coordinate system

Description

The operation creates a region containing pixels lying inside the shape described by inPolygon.

The inFrameWidth and inFrameHeight parameters most often should be set equal to the dimensions of the image this region will be used with. If the input polygon exceeds these dimensions, the output region will be cropped.

Hints

  • Remember to set inFrameWidth and inFrameHeight inputs to specify the region frame.

Examples

Remarks

  • inPolygon has to be a closed path, otherwise an error with appropriate description occurs.

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 Open path on input in CreatePolygonRegion.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • CreateBoxRegion – Creates a rectangular region corresponding to a given box.