最小検出間隔の取得

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

Syntax

C#
public static int fnFIE_fpm_get_pitch(
	FHANDLE hfpm,
	ref int pitch_x,
	ref int pitch_y
)
Visual Basic
Public Shared Function fnFIE_fpm_get_pitch ( 
	hfpm As FHANDLE,
	ByRef pitch_x As Integer,
	ByRef pitch_y As Integer
) As Integer

Parameters

hfpm
Type: fvalgcli..::..FHANDLE
FPMオブジェクト
pitch_x
Type: System..::..Int32%
同一の解であるとみなす範囲で、単位はピクセルです。0の場合パタンの情報から自動決定します。
pitch_y
Type: System..::..Int32%
同一の解であるとみなす範囲で、単位はピクセルです。0の場合パタンの情報から自動決定します。

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_OBJECT不正なオブジェクトが入力されました
F_ERR_INVALID_PARAMパラメータ異常
F_ERR_NO_LICENCEライセンスエラー

Examples

C# Copy imageCopy
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        /// <summary>
        /// 最小検出間隔の取得
        /// </summary>
        /// <param name="hFPM">FPMオブジェクト</param>
        public void fnFIE_fpm_get_pitch(FHANDLE hFPM)
        {
            int pitch_x = 0;
            int pitch_y = 0;
            int status = fvalgcli.api.fnFIE_fpm_get_pitch(hFPM, ref pitch_x, ref pitch_y);
            Assert.IsTrue(status == (int)fvalgcli.f_err.F_ERR_NONE, "fnFIE_fpm_get_pitch: エラーが発生しました。({0})", (fvalgcli.f_err)status);
            Console.WriteLine("fnFIE_fpm_get_pitch");

            // ※ 下記の処理は、事前に fnFIE_fpm_set_pitch でパタンサイズが設定されている前提です.
            int width = 0;
            int height = 0;
            fvalgcli.api.fnFIE_fpm_get_pattern_size(hFPM, ref width, ref height);
            Assert.IsTrue(width == pitch_x, "fnFIE_fpm_get_pitch: pitch_x が一致しません。({0},{1})", width, pitch_x);
            Assert.IsTrue(height == pitch_y, "fnFIE_fpm_get_pitch: pitch_y が一致しません。({0},{1})", height, pitch_y);
        }
    }
}


Visual Basic Copy imageCopy
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    ''' <summary>
    ''' 最小検出間隔の取得
    ''' </summary>
    ''' <param name="hFPM">FPMオブジェクト</param>
    Public Sub fnFIE_fpm_get_pitch(hFPM As FHANDLE)
        Dim pitch_x As Integer = 0
        Dim pitch_y As Integer = 0
        Dim status As Integer = fvalgcli.api.fnFIE_fpm_get_pitch(hFPM, pitch_x, pitch_y)
        Assert.IsTrue(status = CInt(fvalgcli.f_err.F_ERR_NONE), "fnFIE_fpm_get_pitch: エラーが発生しました。({0})", CType(status, fvalgcli.f_err))
        Console.WriteLine("fnFIE_fpm_get_pitch")

        ' ※ 下記の処理は、事前に fnFIE_fpm_set_pitch でパタンサイズが設定されている前提です.
        Dim width As Integer = 0
        Dim height As Integer = 0
        fvalgcli.api.fnFIE_fpm_get_pattern_size(hFPM, width, height)
        Assert.IsTrue(width = pitch_x, "fnFIE_fpm_get_pitch: pitch_x が一致しません。({0},{1})", width, pitch_x)
        Assert.IsTrue(height = pitch_y, "fnFIE_fpm_get_pitch: pitch_y が一致しません。({0},{1})", height, pitch_y)
    End Sub
End Class

See Also