gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2 (算子名称)

名称

gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2 — Create a rectangle of any orientation.

参数签名

gen_rectangle2( : Rectangle : Row, Column, Phi, Length1, Length2 : )

Herror gen_rectangle2(Hobject* Rectangle, double Row, double Column, double Phi, double Length1, double Length2)

Herror T_gen_rectangle2(Hobject* Rectangle, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Length1, const Htuple Length2)

void GenRectangle2(HObject* Rectangle, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2)

void HRegion::GenRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2)

void HRegion::GenRectangle2(double Row, double Column, double Phi, double Length1, double Length2)

static void HOperatorSet.GenRectangle2(out HObject rectangle, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2)

void HRegion.GenRectangle2(HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2)

void HRegion.GenRectangle2(double row, double column, double phi, double length1, double length2)

def gen_rectangle2(row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], length_1: MaybeSequence[Union[int, float]], length_2: MaybeSequence[Union[int, float]]) -> HObject

描述

该算子 gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2 generates one or more rectangles with the center (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn) , the orientation PhiPhiPhiPhiphiphi and the half edge lengths Length1Length1Length1Length1length1length_1 and Length2Length2Length2Length2length2length_2. The orientation is given in arc measure and indicates the angle between the horizontal axis and the edge (with Length1Length1Length1Length1length1length_1) (mathematically positive). The coordinate system runs from (0,0) (upper left corner) to (Width-1,Height-1). See get_systemget_systemGetSystemGetSystemGetSystemget_system and reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDbreset_obj_db in this context. More than one region can be created by passing one tuple of corner points.

注意

The gray values of the output objects are undefined. For speed reasons, the resulting region may contain additional pixels at the border and some individual pixels at the border may be missing. This may lead to an inconsistency between 该算子s smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2smallest_rectangle2 and gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2.

运行信息

参数表

RectangleRectangleRectangleRectanglerectanglerectangle (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Created rectangle.

RowRowRowRowrowrow (input_control)  rectangle2.center.y(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Line index of the center.

Default: 300.0

Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0

Value range: Row Row Row Row row row (lin)

Minimum increment: 1.0

Recommended increment: 10.0

ColumnColumnColumnColumncolumncolumn (input_control)  rectangle2.center.x(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column index of the center.

Default: 200.0

Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0

Value range: Column Column Column Column column column (lin)

Minimum increment: 1.0

Recommended increment: 10.0

PhiPhiPhiPhiphiphi (input_control)  rectangle2.angle.rad(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Angle of the first edge to the horizontal (in radians).

Default: 0.0

Suggested values: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097

Value range: Phi Phi Phi Phi phi phi (lin)

Restriction: - pi / 2 < Phi && Phi <= pi / 2

Length1Length1Length1Length1length1length_1 (input_control)  rectangle2.hwidth(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half width.

Default: 100.0

Suggested values: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0

Value range: Length1 Length1 Length1 Length1 length1 length_1 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

Length2Length2Length2Length2length2length_2 (input_control)  rectangle2.hheight(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Half height.

Default: 20.0

Suggested values: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0

Value range: Length2 Length2 Length2 Length2 length2 length_2 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

结果

If the parameter values are correct 该算子 gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2 返回值 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">).

可能的后置算子

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

可替代算子

gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1gen_rectangle1, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, fill_upfill_upFillUpFillUpFillUpfill_up

参考其它

draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2smallest_rectangle2, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse

模块

Foundation