dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 — Dilate a region with a rectangular structuring element.
dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 applies a dilation with a rectangular
structuring element to the input regions RegionRegionRegionRegionregionregion. The size
of the structuring rectangle is WidthWidthWidthWidthwidthwidth x
HeightHeightHeightHeightheightheight. The operator results in enlarged regions, and the
holes smaller than the rectangular mask in the interior of the
regions are closed.
dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 is a very fast operation because the
height of the rectangle enters only logarithmically into the runtime
complexity, while the width does not enter at all. This leads to
excellent runtime efficiency, even in the case of very large
rectangles (edge length > 100).
Attention
dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 is applied to each input region
separately. If gaps between different regions are to be closed,
union1union1Union1Union1Union1union1 or union2union2Union2Union2Union2union2 has to be called first.
To enlarge a region by the same amount in all directions,
WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight must be odd. If this is not the
case, the region is dilated by a larger amount at the right or at
the bottom, respectively, than at the left or at the top.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Let F1 be the area of an input region and H be the height of the
rectangle. Then the runtime complexity for one region is:
Result
dilation_rectangle1dilation_rectangle1DilationRectangle1DilationRectangle1DilationRectangle1dilation_rectangle1 returns 2 (H_MSG_TRUE) if all parameters are
correct. The behavior in case of empty or no input region can be
set via:
no region:
set_system('no_object_result',<RegionResult>)