重心2次モーメントの取得

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

Syntax

C#
public static int fnFIE_measure_get_central_moment2(
	FHANDLE hresult,
	uint blobno,
	ref double mg20,
	ref double mg02,
	ref double mg11
)
Visual Basic
Public Shared Function fnFIE_measure_get_central_moment2 ( 
	hresult As FHANDLE,
	blobno As UInteger,
	ByRef mg20 As Double,
	ByRef mg02 As Double,
	ByRef mg11 As Double
) As Integer

Parameters

hresult
Type: fvalgcli..::..FHANDLE
ブローブ解析結果ハンドル
blobno
Type: System..::..UInt32
対象ブローブのブローブ番号
mg20
Type: System..::..Double%
x方向2次モーメント
mg02
Type: System..::..Double%
y方向2次モーメント
mg11
Type: System..::..Double%
xy方向2次モーメント

Return Value

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

エラーコード:
f_err内容
F_ERR_NONE正常終了
F_ERR_INVALID_OBJECThresult に指定されたオブジェクトハンドルが不正
F_ERR_INVALID_PARAMblobno に指定されたブローブ番号が不正, パラメータに IntPtr.Zero が渡された
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_measure_get_central_moment2(FHANDLE result, uint blobno)
        {
            try
            {
                double mg20 = 0;
                double mg02 = 0;
                double mg11 = 0;
                int status = api.fnFIE_measure_get_central_moment2(result, blobno, ref mg20, ref mg02, ref mg11);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_measure_get_central_moment2: エラーが発生しました。({0})", (f_err)status);
                Console.WriteLine("fnFIE_measure_get_central_moment2");
                // 出力.
                Console.WriteLine("mg20={0}, mg02={1}, mg11={2}", mg20, mg02, mg11);
            }
            finally
            {
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

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

Public Partial Class FIE
    Public Sub fnFIE_measure_get_central_moment2(result As FHANDLE, blobno As UInteger)
        Try
            Dim mg20 As Double = 0
            Dim mg02 As Double = 0
            Dim mg11 As Double = 0
            Dim status As Integer = api.fnFIE_measure_get_central_moment2(result, blobno, mg20, mg02, mg11)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_measure_get_central_moment2: エラーが発生しました。({0})", CType(status, f_err))
            Console.WriteLine("fnFIE_measure_get_central_moment2")
            ' 出力.
            Console.WriteLine("mg20={0}, mg02={1}, mg11={2}", mg20, mg02, mg11)
        Finally
        End Try
    End Sub
End Class

See Also