Skip to content

gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2gen_rectangle2🔗

説明🔗

gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2gen_rectangle2 — 任意の方向を持つ矩形領域を生成する。

書式🔗

gen_rectangle2( out region Rectangle, rectangle2.center.y Row, rectangle2.center.x Column, rectangle2.angle.rad Phi, rectangle2.hwidth Length1, rectangle2.hheight Length2 )void GenRectangle2( HObject* Rectangle, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2 )static void HOperatorSet.GenRectangle2( out HObject rectangle, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple 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

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 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 )

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 )

説明🔗

オペレーター gen_rectangle2GenRectangle2 は、中心(Rowrowrow, Columncolumncolumn)、方向 Phiphiphi、半分のエッジ長 Length1length1length_1 と Length2length2length_2 の 1 つ以上の矩形を生成しま す。 その方向は弧測定で与えられ、水平な軸とそのエッジ(Length1length1length_1)の間の角度 を示します(数学的に正)。 座標系は、左上隅を基点 (0,0) として (Width-1,Height-1) までです。 これに関しては,get_systemGetSystem と reset_obj_dbResetObjDb を参照 してください。 Tuple配列を入力する によって、1 つ以上の領域を一度に生成する ことができます。

パラメータ ブロードキャスト🔗

このオペレータはパラメータ ブロードキャストをサポートします。 これは、各パラメーターを長さ1 または NのTupleで指定できることを意味する。 Tuple長さ 1 のパラメーターは、作成される項目の数は常に Nになるように内部的に繰り返されます。

注意🔗

出力オブジェクトのグレイ値は未定義です。速度上の理由により、結果の 領域に境界に追加のピクセルが含まれる場合があり、境界のいくつかのピ クセルが欠落する場合もあります。 これによって、オペレーター smallest_rectangle2SmallestRectangle2 と gen_rectangle2GenRectangle2 の一貫性が損なわれる場合があります。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Rectanglerectanglerectangle (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

生成される矩形

Rowrowrow (input_control) rectangle2.center.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

中心の行座標

初期値: 300.0300.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
値域: Row (lin)
最小増分: 1.0
推奨増分: 10.0

Columncolumncolumn (input_control) rectangle2.center.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

中心の列座標

初期値: 200.0200.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
値域: Column (lin)
最小増分: 1.0
推奨増分: 10.0

Phiphiphi (input_control) rectangle2.angle.rad(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

水平軸に対する最初のエッジの角度 (ラジアン)

初期値: 0.00.0
推奨値: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097-1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097
値域: Phi (lin)
制限: -pi / 2 < Phi && Phi <= pi / 2

Length1length1length_1 (input_control) rectangle2.hwidth(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

半分の幅

初期値: 100.0100.0
推奨値: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.03.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0
値域: Length1 (lin)
最小増分: 1.0
推奨増分: 10.0

Length2length2length_2 (input_control) rectangle2.hheight(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

半分の高さ

初期値: 20.020.0
推奨値: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.01.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0
値域: Length2 (lin)
最小増分: 1.0
推奨増分: 10.0

結果🔗

パラメーター値が正しいならば、オペレーター gen_rectangle2GenRectangle2 は値 2 (H_MSG_TRUE) を返します。 それ以外の場合には例外処理が発生します。 現在の画像フォーマットに従うクリッピングは、オペレーター set_system('clip_region',<'true'/'false'>) によって設定さ れます。

他のオペレーターとの組み合わせ🔗

組み合わせ

後処理の候補

paint_regionPaintRegion, reduce_domainReduceDomain

他の選択候補

gen_rectangle1GenRectangle1, gen_region_polygon_filledGenRegionPolygonFilled, gen_region_polygonGenRegionPolygon, gen_region_pointsGenRegionPoints, fill_upFillUp

関連項目

draw_rectangle2DrawRectangle2, reduce_domainReduceDomain, smallest_rectangle2SmallestRectangle2, gen_ellipseGenEllipse

モジュール🔗

Foundation