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_maxminpos(
	FHANDLE hreg,
	ref int xmin_at_ymin,
	ref int xmax_at_ymax,
	ref int ymin_at_xmax,
	ref int ymax_at_xmin
)
Visual Basic
Public Shared Function fnFIE_region_get_maxminpos ( 
	hreg As FHANDLE,
	ByRef xmin_at_ymin As Integer,
	ByRef xmax_at_ymax As Integer,
	ByRef ymin_at_xmax As Integer,
	ByRef ymax_at_xmin As Integer
) As Integer

Parameters

hreg
Type: fvalgcli..::..FHANDLE
REGIONハンドル
xmin_at_ymin
Type: System..::..Int32%
Yの最小位置におけるXの最小値
xmax_at_ymax
Type: System..::..Int32%
Yの最大位置におけるXの最大値
ymin_at_xmax
Type: System..::..Int32%
Xの最大位置におけるYの最小値
ymax_at_xmin
Type: System..::..Int32%
Xの最小位置におけるYの最大値

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_PARAM不正なパラメータが指定された
  • xmin_at_ymin, xmax_at_ymax, ymin_at_xmax, ymax_at_xmin に 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_maxminpos(FHANDLE hRegion)
        {
            try
            {
                // リージョン特徴量:座標の最大最小位置.
                int xmin_at_ymin = 0;
                int xmax_at_ymax = 0;
                int ymin_at_xmax = 0;
                int ymax_at_xmin = 0;
                int status = api.fnFIE_region_get_maxminpos(hRegion, ref xmin_at_ymin, ref xmax_at_ymax, ref ymin_at_xmax, ref ymax_at_xmin);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_region_get_maxminpos: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_region_get_maxminpos");

                // 値の確認.
                Console.WriteLine("xmin_at_ymin={0},xmax_at_ymax={1},ymin_at_xmax={2},ymax_at_xmin={3}", xmin_at_ymin, xmax_at_ymax, ymin_at_xmax, ymax_at_xmin);
            }
            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_maxminpos(hRegion As FHANDLE)
        Try
            ' リージョン特徴量:座標の最大最小位置.
            Dim xmin_at_ymin As Integer = 0
            Dim xmax_at_ymax As Integer = 0
            Dim ymin_at_xmax As Integer = 0
            Dim ymax_at_xmin As Integer = 0
            Dim status As Integer = api.fnFIE_region_get_maxminpos(hRegion, xmin_at_ymin, xmax_at_ymax, ymin_at_xmax, ymax_at_xmin)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_region_get_maxminpos: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_region_get_maxminpos")

            ' 値の確認.
            Console.WriteLine("xmin_at_ymin={0},xmax_at_ymax={1},ymin_at_xmax={2},ymax_at_xmin={3}", xmin_at_ymin, xmax_at_ymax, ymin_at_xmax, ymax_at_xmin)
        Finally
        End Try
    End Sub
End Class

See Also