You are here: Start » FIL.NET » Function Reference » Region » Region Morphology » FIL.OpenRegion
Performs a morphological opening on a region using a predefined kernel.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void OpenRegion ( FilNet.Region inRegion, FilNet.KernelShape inKernel, int inRadiusX, int? inRadiusY, FilNet.Region outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inRegion | FilNet.Region | Input region. | ||
![]() | inKernel | FilNet.KernelShape | Kernel shape (predefined). | ||
![]() | inRadiusX | int | <0, INF> | 1 | Nearly half of the kernel's width (2*R+1). Default value: 1. |
![]() | inRadiusY | int? | <0, INF> | Nearly half of the kernel's height (2*R+1), or same as inRadiusX. Default value: ftl::NIL. | |
![]() | outRegion | FilNet.Region | Output region. |
Description
The operation performs a morphological opening, which is a tool used for removing thin parts from a region. The operation is a convolution of two basic morphological operations:
- Firstly, the input region is eroded using ErodeRegion operation.
- Then, the resulting region is dilated using DilateRegion operation.
During the erosion thin parts of a region are eliminated, while further dilation assures that the width of region limbs is preserved.
Both of the component operations are conducted using the same inKernel, inRadiusX and inRadiusY parameters.
Examples
![]() |
![]() |
OpenRegion run with inKernel = Ellipse of dimensions inRadiusX = 3, inRadiusY = 3.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Unsupported kernel in OpenRegion. |