gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector (算子)
名称
gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector — 创建椭圆扇区。
签名
Herror gen_ellipse_sector(Hobject* EllipseSector, double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)
Herror T_gen_ellipse_sector(Hobject* EllipseSector, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, const Htuple StartAngle, const Htuple EndAngle)
void GenEllipseSector(HObject* EllipseSector, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)
void HRegion::HRegion(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)
void HRegion::HRegion(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)
void HRegion::GenEllipseSector(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)
void HRegion::GenEllipseSector(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)
static void HOperatorSet.GenEllipseSector(out HObject ellipseSector, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)
public HRegion(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)
public HRegion(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)
void HRegion.GenEllipseSector(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)
void HRegion.GenEllipseSector(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)
def gen_ellipse_sector(row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], radius_1: MaybeSequence[Union[int, float]], radius_2: MaybeSequence[Union[int, float]], start_angle: MaybeSequence[Union[int, float]], end_angle: MaybeSequence[Union[int, float]]) -> HObject
描述
算子 gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector generates one or more ellipse
sectors with the center
(RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), the orientation PhiPhiPhiPhiphiphi,
the half-radii Radius1Radius1Radius1Radius1radius1radius_1 and Radius2Radius2Radius2Radius2radius2radius_2, and the start and end
angles StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle and EndAngleEndAngleEndAngleEndAngleendAngleend_angle.
The angles are given in radians in mathematically positive direction.
An illustration showing this can be found in the reference of
gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSectorgen_circle_sector。Note, 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)""rad(360)" is equivalent to 0.
As a consequence a sector with StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle = 0 and
EndAngleEndAngleEndAngleEndAngleendAngleend_angle = 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)""rad(360)" results in an empty region.
More than one region can be created by
passing tuples of parameter values.
The center must be located within the image coordinates.
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.
If the ellipse reaches beyond the edge of the image it is clipped
to the current image format according to the value of
the system flag 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" (set_systemset_systemSetSystemSetSystemSetSystemset_system).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
EllipseSectorEllipseSectorEllipseSectorEllipseSectorellipseSectorellipse_sector (输出对象) region(-array) → objectHRegionHObjectHRegionHobject *
Created ellipse(s).
RowRowRowRowrowrow (输入控制) coordinates.y(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Line index of center.
默认值:
200.0
建议值:
0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
值范围:
1.0
≤
Row
Row
Row
Row
row
row
≤
1024.0 (lin)
最小增量:
1.0
建议增量:
10.0
ColumnColumnColumnColumncolumncolumn (输入控制) coordinates.x(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column index of center.
默认值:
200.0
建议值:
0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
值范围:
1.0
≤
Column
Column
Column
Column
column
column
≤
1024.0 (lin)
最小增量:
1.0
建议增量:
10.0
PhiPhiPhiPhiphiphi (输入控制) angle.rad(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Orientation of the longer radius (Radius1).
默认值:
0.0
建议值:
-1.5707, -1.1781, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.1781, 1.5707
值范围:
-1.570796
≤
Phi
Phi
Phi
Phi
phi
phi
≤
1.570796 (lin)
限制:
- pi / 2 <= Phi <= pi / 2
Radius1Radius1Radius1Radius1radius1radius_1 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Longer radius.
默认值:
100.0
建议值:
2.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
值范围:
Radius1
Radius1
Radius1
Radius1
radius1
radius_1
(lin)
最小增量:
1.0
建议增量:
10.0
限制:
Radius1 > 0
Radius2Radius2Radius2Radius2radius2radius_2 (输入控制) number(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Shorter radius.
默认值:
60.0
建议值:
1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
值范围:
Radius2
Radius2
Radius2
Radius2
radius2
radius_2
(lin)
最小增量:
1.0
建议增量:
10.0
限制:
Radius2 > 0 && Radius2 <= Radius1
StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle (输入控制) angle.rad(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Start angle of the sector.
默认值:
0.0
建议值:
0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318
值范围:
0
≤
StartAngle
StartAngle
StartAngle
StartAngle
startAngle
start_angle
≤
6.28318 (lin)
EndAngleEndAngleEndAngleEndAngleendAngleend_angle (输入控制) angle.rad(-array) → HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
End angle of the sector.
默认值:
3.14159
建议值:
0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318
值范围:
0
≤
EndAngle
EndAngle
EndAngle
EndAngle
endAngle
end_angle
≤
6.28318 (lin)
示例(HDevelop)
read_image (Image, 'fabrik')
gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\
150, 90, rad(45), rad(280))
reduce_domain (Image, EllipseSector, ImageReduced)
dev_clear_window ()
dev_display (ImageReduced)
复杂度
Runtime complexity: O(Radius1Radius1Radius1Radius1radius1radius_1 * 2)
Storage complexity (byte): O(Radius1Radius1Radius1Radius1radius1radius_1 * 8)
结果
如果参数值正确,算子 gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse 返回值 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">)。
可能的后继
paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain
替代
gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle,
gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSectorgen_circle_sector,
gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled,
draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse,
gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse
另见
disp_ellipsedisp_ellipseDispEllipseDispEllipseDispEllipsedisp_ellipse,
set_shapeset_shapeSetShapeSetShapeSetShapeset_shape,
smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCirclesmallest_circle,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain
模块
基础