REGION特徴量:座標の最大最小値

Namespace: fvalgcli
Assembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)

Syntax

C#
public static int fnFIE_region_get_xyrange(
	FHANDLE hreg,
	ref int xmin,
	ref int xmax,
	ref int ymin,
	ref int ymax
)
Visual Basic
Public Shared Function fnFIE_region_get_xyrange ( 
	hreg As FHANDLE,
	ByRef xmin As Integer,
	ByRef xmax As Integer,
	ByRef ymin As Integer,
	ByRef ymax As Integer
) As Integer

Parameters

hreg
Type: fvalgcli..::..FHANDLE
REGIONハンドル
xmin
Type: System..::..Int32%
X座標最小値
xmax
Type: System..::..Int32%
X座標最大値
ymin
Type: System..::..Int32%
Y座標最小値
ymax
Type: System..::..Int32%
Y座標最大値

Return Value

Type: Int32
以下のエラーコードを返します。

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_PARAM不正なパラメータが指定された
  • xmin, xmax, ymin, ymax に IntPtr.Zero が指定された
F_ERR_INVALID_OBJECT不正なハンドル
F_ERR_CALC_IMPOSSIBLE 計算不能
F_ERR_NO_LICENCEライセンスエラー、または未初期化エラー

Remarks

Examples

C# Copy imageCopy
//    $Revision: 1.1 $

using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        public void fnFIE_region_get_xyrange(FHANDLE hRegion)
        {
            try
            {
                // リージョン特徴量:座標の最大値・最小値.
                int xmin = 0;
                int xmax = 0;
                int ymin = 0;
                int ymax = 0;
                int status = api.fnFIE_region_get_xyrange(hRegion, ref xmin, ref xmax, ref ymin, ref ymax);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_region_get_xyrange: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_region_get_xyrange");

                // 値の確認.
                Console.WriteLine("xmin={0},xmax={1},ymin={2},ymax={3}", xmin, xmax, ymin, ymax);
            }
            finally
            {
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    Public Sub fnFIE_region_get_xyrange(hRegion As FHANDLE)
        Try
            ' リージョン特徴量:座標の最大値・最小値.
            Dim xmin As Integer = 0
            Dim xmax As Integer = 0
            Dim ymin As Integer = 0
            Dim ymax As Integer = 0
            Dim status As Integer = api.fnFIE_region_get_xyrange(hRegion, xmin, xmax, ymin, ymax)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_region_get_xyrange: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_region_get_xyrange")

            ' 値の確認.
            Console.WriteLine("xmin={0},xmax={1},ymin={2},ymax={3}", xmin, xmax, ymin, ymax)
        Finally
        End Try
    End Sub
End Class

See Also