gen_parallel_contour_xldgen_parallel_contour_xldGenParallelContourXldGenParallelContourXldgen_parallel_contour_xld (Operator)

Name

gen_parallel_contour_xldgen_parallel_contour_xldGenParallelContourXldGenParallelContourXldgen_parallel_contour_xld — Compute the parallel contour of an XLD contour.

Signature

gen_parallel_contour_xld(Contours : ParallelContours : Mode, Distance : )

Herror gen_parallel_contour_xld(const Hobject Contours, Hobject* ParallelContours, const char* Mode, double Distance)

Herror T_gen_parallel_contour_xld(const Hobject Contours, Hobject* ParallelContours, const Htuple Mode, const Htuple Distance)

void GenParallelContourXld(const HObject& Contours, HObject* ParallelContours, const HTuple& Mode, const HTuple& Distance)

HXLDCont HXLDCont::GenParallelContourXld(const HString& Mode, const HTuple& Distance) const

HXLDCont HXLDCont::GenParallelContourXld(const HString& Mode, double Distance) const

HXLDCont HXLDCont::GenParallelContourXld(const char* Mode, double Distance) const

HXLDCont HXLDCont::GenParallelContourXld(const wchar_t* Mode, double Distance) const   ( Windows only)

static void HOperatorSet.GenParallelContourXld(HObject contours, out HObject parallelContours, HTuple mode, HTuple distance)

HXLDCont HXLDCont.GenParallelContourXld(string mode, HTuple distance)

HXLDCont HXLDCont.GenParallelContourXld(string mode, double distance)

def gen_parallel_contour_xld(contours: HObject, mode: str, distance: Union[float, int]) -> HObject

Description

gen_parallel_contour_xldgen_parallel_contour_xldGenParallelContourXldGenParallelContourXldgen_parallel_contour_xld computes for each of the input contours ContoursContoursContourscontourscontours a parallel contour with distance DistanceDistanceDistancedistancedistance. The resulting contours are returned in ParallelContoursParallelContoursParallelContoursparallelContoursparallel_contours. To calculate the parallel contour, the normal vector of the input contour is needed in every contour point. The parameter ModeModeModemodemode determines how these normal vectors are computed. If ModeModeModemodemode = 'gradient'"gradient""gradient""gradient""gradient", it is assumed that the input contours are edges, and the normal information is obtained from the gradient direction of the edge (see edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix). For this, the attribute 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction" must exist for the input contour (see get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld). If ModeModeModemodemode = 'contour_normal'"contour_normal""contour_normal""contour_normal""contour_normal", a possibly existing normal information is used to determine the normals. For this, the contour attribute 'angle'"angle""angle""angle""angle" must exist (see lines_gausslines_gaussLinesGaussLinesGausslines_gauss or edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix). Finally, if ModeModeModemodemode = 'regression_normal'"regression_normal""regression_normal""regression_normal""regression_normal", the normal vectors are determined from a local line fit to each contour point. Here, the normal vectors are oriented such that they point to the right side of the contour when the contour is traversed from start to end. In contrast to the first two modes, this mode can be used for all XLD contours, no matter how they were generated.

Execution Information

Parameters

ContoursContoursContourscontourscontours (input_object)  xld_cont-array objectHXLDContHObjectHObjectHobject

Contours to be transformed.

ParallelContoursParallelContoursParallelContoursparallelContoursparallel_contours (output_object)  xld_cont-array objectHXLDContHObjectHObjectHobject *

Parallel contours.

ModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Mode, with which the direction information is computed.

Default: 'regression_normal' "regression_normal" "regression_normal" "regression_normal" "regression_normal"

Suggested values: 'gradient'"gradient""gradient""gradient""gradient", 'contour_normal'"contour_normal""contour_normal""contour_normal""contour_normal", 'regression_normal'"regression_normal""regression_normal""regression_normal""regression_normal"

DistanceDistanceDistancedistancedistance (input_control)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Distance of the parallel contour.

Default: 1

Suggested values: 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 7, 10, 15, 20, 30, 40, 50

Possible Predecessors

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, lines_gausslines_gaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixthreshold_sub_pix

Possible Successors

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld

See also

get_contour_xldget_contour_xldGetContourXldGetContourXldget_contour_xld

Module

Foundation