gen_region_polygonT_gen_region_polygonGenRegionPolygonGenRegionPolygongen_region_polygon (算子)
名称
gen_region_polygonT_gen_region_polygonGenRegionPolygonGenRegionPolygongen_region_polygon — 将多边形存储为区域。
签名
Herror T_gen_region_polygon(Hobject* Region, const Htuple Rows, const Htuple Columns)
def gen_region_polygon(rows: Sequence[int], columns: Sequence[int]) -> HObject
描述
算子 gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon creates a region from a polygon
row described by
a series of line and column coordinates. The created
region
consists of the pixels of the routes defined thereby, wherein it is linearly
interpolated between the base points.
注意
The region is not automatically closed and not filled.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 在内部数据级别上自动并行化。
参数
RegionRegionRegionRegionregionregion (输出对象) region → objectHRegionHObjectHRegionHobject *
Created region.
RowsRowsRowsRowsrowsrows (输入控制) polygon.y-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Line indices of the base points of the region contour.
默认值:
100
建议值:
0, 10, 30, 50, 100, 200, 300, 500
值范围:
Rows
Rows
Rows
Rows
rows
rows
(lin)
最小增量:
1
建议增量:
1
ColumnsColumnsColumnsColumnscolumnscolumns (输入控制) polygon.x-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Column indices of the base points of the region
contour.
元素数量:
Columns == Rows
默认值:
100
建议值:
0, 10, 30, 50, 100, 200, 300, 500
值范围:
Columns
Columns
Columns
Columns
columns
columns
(lin)
最小增量:
1
建议增量:
1
示例(HDevelop)
* Polygon-approximation
get_region_polygon(Region,7,Row,Column)
* store it as a region
gen_region_polygon(Pol,Row,Column)
* fill up the hole
fill_up(Pol,Filled)
示例(C)
/* Polygon-approximation */
T_get_region_polygon(Region,7,&Row,&Column);
/* store it as a region */
T_gen_region_polygon(&Pol,Row,Column);
destroy_tuple(Row);
destroy_tuple(Column);
/* fill up the hole */
fill_up(Pol,&Filled);
示例(HDevelop)
* Polygon-approximation
get_region_polygon(Region,7,Row,Column)
* store it as a region
gen_region_polygon(Pol,Row,Column)
* fill up the hole
fill_up(Pol,Filled)
示例(HDevelop)
* Polygon-approximation
get_region_polygon(Region,7,Row,Column)
* store it as a region
gen_region_polygon(Pol,Row,Column)
* fill up the hole
fill_up(Pol,Filled)
示例(HDevelop)
* Polygon-approximation
get_region_polygon(Region,7,Row,Column)
* store it as a region
gen_region_polygon(Pol,Row,Column)
* fill up the hole
fill_up(Pol,Filled)
结果
If the base points are correct the operator gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
The clipping according to the current image format is set via the
operator set_system('clip_region',<'true'/'false'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)set_system("clip_region",<"true"/"false">)。If an empty region is created (by the clipping or by an empty input)
the operator
set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)set_system("store_empty_region",<"true"/"false">) determines
whether the region is returned or an empty object tuple.
可能的前趋
get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon,
draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygondraw_polygon
替代
gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points,
gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs
另见
fill_upfill_upFillUpFillUpFillUpfill_up,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon,
draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygondraw_polygon
模块
基础