You are here: Start » FIL.NET » Function Reference » Region » Region Basics » FIL.CreatePolygonRegion
Creates a polygonal region corresponding to a given closed path.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void CreatePolygonRegion ( FilNet.Path inPolygon, FilNet.CoordinateSystem2D? inPolygonAlignment, int inFrameWidth, int inFrameHeight, FilNet.Region outRegion, NullableRef<FilNet.Path> outAlignedPolygon )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPolygon | FilNet.Path | |||
![]() | inPolygonAlignment | FilNet.CoordinateSystem2D? | Adjusts the polygon to the position of the inspected object. Default value: ftl::NIL. | ||
![]() | inFrameWidth | int | <0, 65535> | Width of the created region's frame. | |
![]() | inFrameHeight | int | <0, 65535> | Height of the created region's frame. | |
![]() | outRegion | FilNet.Region | Output region. | ||
![]() | outAlignedPolygon | FilNet.NullableRef<FilNet.Path> | The input polygon transformed to the absolute coordinate system. Can be null to skip this parameter calculation. |
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.
Examples
![]() |
![]() |
Remarks
- inPolygon has to be a closed path, otherwise an error with appropriate description occurs.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Open path on input in CreatePolygonRegion. |
Function Overrides
- CreatePolygonRegion(Path, Int32, Int32, Region)
- CreatePolygonRegion(Path, Nullable<CoordinateSystem2D>, Int32, Int32, Region)
- CreatePolygonRegion(Path, Nullable<CoordinateSystem2D>, Int32, Int32, Region, Path)