Skip to content

set_shapeSetShapeSetShapeset_shapeT_set_shape🔗

説明🔗

set_shapeSetShapeSetShapeset_shapeT_set_shape — 出力領域の形状を定義する。

書式🔗

set_shape( window WindowHandle, string Shape )void SetShape( const HTuple& WindowHandle, const HTuple& Shape )static void HOperatorSet.SetShape( HTuple windowHandle, HTuple shape )def set_shape( window_handle: HHandle, shape: str ) -> None

Herror T_set_shape( const Htuple WindowHandle, const Htuple Shape )

void HWindow::SetShape( const HString& Shape ) const

void HWindow::SetShape( const char* Shape ) const

void HWindow::SetShape( const wchar_t* Shape ) const (Windows only)

void HWindow.SetShape( string shape )

説明🔗

set_shapeSetShape は、領域出力の形状を定義します。それは、ウインド ウ ID WindowHandlewindowHandlewindow_handle をもつウインドウに対してのみ有効です。 定義した出力形状は disp_regionDispRegionによって使用されます。使用可 能な形状は query_shapeQueryShape によって確認できます。

使用可能なモード:

  • 'original'"original": 形状は変更されずに表示されます。 set_line_widthSetLineWidth による 変更とは関係なく、形状は表示されます。これは、他のすべての モードについても同様です。

  • 'outer_circle'"outer_circle": 各領域は、領域を囲む最小円によって表示されます。( smallest_circleSmallestCircle を参照してください。)

  • 'inner_circle'"inner_circle": 各領域は、最大の包含円によって表示されます。( inner_circleInnerCircle を参照してください。)

  • 'ellipse'"ellipse": 各領域は、同じモーメントと方向をもつ楕円によって表 示されます(elliptic_axisEllipticAxis を参照してくださ い)。

  • 'rectangle1'"rectangle1": 各領域は、座標軸に平行な領域を囲む矩形によって表示 されます。(smallest_rectangle1SmallestRectangle1 を参照してく ださい。)

  • 'rectangle2'"rectangle2": 各領域は、領域を囲む最小矩形によって表示されます。( smallest_rectangle2SmallestRectangle2 )

  • 'convex'"convex": 各領域は、凸包によって表示されます( convexityConvexity を参照してください)。

  • 'icon'"icon": 各領域は、set_iconSetIcon で重心に設定されたアイコ ンによって表示されます。

注意🔗

領域出力を使用して出力パラメーター設定を行う グレイ値出力オペレーターには注意してください。

実行情報🔗

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

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

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

パラメーター🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

ウインドウハンドル

Shapeshapeshape (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

領域出力のモード

初期値: 'original'"original"
値のリスト: 'convex', 'ellipse', 'icon', 'inner_circle', 'original', 'outer_circle', 'rectangle1', 'rectangle2'"convex", "ellipse", "icon", "inner_circle", "original", "outer_circle", "rectangle1", "rectangle2"

例🔗

(HDevelop)


read_image(Image,'fabrik')
regiongrowing(Image,Seg,5,5,6,100)
set_colored(WindowHandle,12)
set_shape(WindowHandle,'rectangle2')
disp_region(Seg,WindowHandle)

結果🔗

パラメーターが正しく、ウインドウも有効である場合、 set_shapeSetShape は 2 (H_MSG_TRUE) を返します。それ以外の場合には例外が発生 します。

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

組み合わせ

前処理の候補

set_iconSetIcon, query_shapeQueryShape, get_shapeGetShape

後処理の候補

disp_regionDispRegion

関連項目

get_shapeGetShape, query_shapeQueryShape, disp_regionDispRegion

モジュール🔗

Foundation