gen_region_polygon_filledT_gen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled (算子名称)
名称
gen_region_polygon_filledT_gen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled — Store a polygon as a “filled” region.
参数签名
Herror T_gen_region_polygon_filled(Hobject* 区域, const Htuple Rows, const Htuple Columns)
void GenRegionPolygonFilled(HObject* 区域, const HTuple& Rows, const HTuple& Columns)
void HRegion::GenRegionPolygonFilled(const HTuple& Rows, const HTuple& Columns)
def gen_region_polygon_filled(rows: Sequence[Union[int, float]], columns: Sequence[Union[int, float]]) -> HObject
描述
该算子 gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled creates a region from
a polygon containing the corner points of the region (line and
column coordinates) either clockwise or anti-clockwise.
Contrary to gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon a “filled” region is
returned here.
Note that for subpixel coordinates RowsRowsRowsRowsrowsrows and ColumnsColumnsColumnsColumnscolumnscolumns the
coordinates are rounded before the polygon containing the corner points is
determined. Therefore there might be pixels in the 区域区域区域区域区域区域 which
do not lie on the orignial (subpixel) polygon. An simple alternative in
the case of polygons without holes would be to use 该算子s
gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon and fill_upfill_upFillUpFillUpFillUpfill_up.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
区域区域区域区域区域区域 (output_object) region → objectHRegionHObjectHRegionHobject *
Created region.
RowsRowsRowsRowsrowsrows (input_control) polygon.y-array → HTupleSequence[Union[int, float]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Line indices of the base points of the region contour.
Default:
100
Suggested values:
0, 10, 30, 50, 100, 200, 300, 500
Value range:
Rows
Rows
Rows
Rows
rows
rows
(lin)
Minimum increment:
1
Recommended increment:
1
ColumnsColumnsColumnsColumnscolumnscolumns (input_control) polygon.x-array → HTupleSequence[Union[int, float]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Column indices of the base points of the region
contour.
Number of elements:
Columns == Rows
Default:
100
Suggested values:
0, 10, 30, 50, 100, 200, 300, 500
Value range:
Columns
Columns
Columns
Columns
columns
columns
(lin)
Minimum increment:
1
Recommended increment:
1
例程 (C)
/* Polygon approximation */
T_get_region_polygon(Region,7,&Row,&Column);
T_gen_region_polygon_filled(&Pol,Row,Column);
/* fill up with original gray value */
reduce_domain(Image,Pol,&New);
结果
If the base points are correct 该算子 gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled
返回值 2 (
H_MSG_TRUE)
.
Otherwise an exception is raised.
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)
该算子
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_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points,
draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygondraw_polygon
参考其它
gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon,
gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs
模块
Foundation