CloseRegion
Performs a morphological closing on a region using selected predefined kernel.
Applications:Filling-in small gaps in a region without making it thicker.
Syntax
C++
C#
Python
def CloseRegion( inRegion: Region, outRegion: Region, /, *, inKernel: KernelShape = KernelShape.Box, inRadiusX: int = 1, inRadiusY: int | None = None ) -> None
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inRegion | Region | Input region | ||
![]() |
inKernel | KernelShape | KernelShape.Box | Kernel shape (predefined) | |
![]() |
inRadiusX | int | 0 - ![]() |
1 | Nearly half of the kernel's width (2*R+1) |
![]() |
inRadiusY | int | None | 0 - ![]() |
None | Nearly half of the kernel's height (2*R+1), or same as inRadiusX |
![]() |
outRegion | Region | Output region |



