Operator Reference
gen_region_contour_xld (Operator)
gen_region_contour_xld
— Create a region from an XLD contour.
Signature
Description
gen_region_contour_xld
creates a region Region
from a
subpixel XLD contour Contour
. The contour is sampled
according to the Bresenham algorithm and influenced by the parameter
'neighborhood' of the operator set_system
. Open contours
are closed before converting them to regions. Finally, the parameter
Mode
defines whether the region is filled up ('filled' )
or returned by its contour ('margin' ).
Please note that the coordinates of the contour points are rounded
to their nearest integer pixel coordinates during the conversion.
This may lead to unexpected results when passing the contour
obtained by the operator gen_contour_region_xld
to
gen_region_contour_xld
: When setting Mode
of
gen_contour_region_xld
to 'border' , the input region
of gen_contour_region_xld
and the output region of
gen_region_contour_xld
differ. For example, let us assume
that the input region of gen_contour_region_xld
consists of
the single pixel (1,1). Then, the resulting contour that is
obtained when calling gen_contour_region_xld
with
Mode
set to 'border' consists of the five points
(0.5,0.5), (0.5,1.5), (1.5,1.5), (1.5,0.5), and (0.5,0.5).
Consequently, when passing this contour again to
gen_region_contour_xld
, the resulting region consists of the
points (1,1), (1,2), (2,2), and (2,1).
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
Contour
(input_object) xld_cont(-array) →
object
Input contour(s).
Region
(output_object) region(-array) →
object
Created region(s).
Mode
(input_control) string →
(string)
Fill mode of the region(s).
Default: 'filled'
Suggested values: 'filled' , 'margin'
Possible Predecessors
gen_contour_polygon_xld
,
gen_contour_polygon_rounded_xld
Alternatives
gen_region_polygon
,
gen_region_polygon_xld
See also
Module
Foundation