Exemplo n.º 1
0
        public MeasureResult Action()
        {
            #region 輸出結果
            DistanceResult mResult = null;
            #endregion

            var fMidLine = new SDMS_FirstFingerMidLine();
            var image    = new HImage(ho_Image);
            fMidLine.Initialize(image, hv_AllModelRow, hv_AllModelColumn, hv_AllModelAngle);
            var fMidLineModel = fMidLine.GetMidLine() as IMeasureGeoModel;

            var sMidLine = new SecondFingerMidLine();
            sMidLine.Initialize(image, hv_AllModelRow, hv_AllModelColumn, hv_AllModelAngle);
            var sMidLineModel = sMidLine.GetMidLine() as IMeasureGeoModel;

            var distance = DistanceHelper.LineToLine(fMidLineModel, sMidLineModel);

            mResult = new DistanceResult()
            {
                FirstRowBegin  = fMidLineModel.Row1,
                FirstColBegin  = fMidLineModel.Col1,
                FirstRowEnd    = fMidLineModel.Row2,
                FirstColEnd    = fMidLineModel.Col2,
                SecondRowBegin = sMidLineModel.Row1,
                SecondColBegin = sMidLineModel.Col1,
                SecondRowEnd   = sMidLineModel.Row2,
                SecondColEnd   = sMidLineModel.Col2,
                Angle          = hv_AllModelAngle,
                Direction      = LineDirection.Horizontal,
                Distance       = distance,
            };
            return(mResult);
        }
Exemplo n.º 2
0
        public MeasureResult Action()
        {
            #region 輸出結果
            DistanceResult mResult = null;
            #endregion

            var fMidLine = new SDMS_FirstFingerMidLine();
            var image = new HImage(ho_Image);
            fMidLine.Initialize(image, hv_AllModelRow, hv_AllModelColumn, hv_AllModelAngle);
            var fMidLineModel = fMidLine.GetMidLine() as IMeasureGeoModel;

            var sMidLine = new SecondFingerMidLine();
            sMidLine.Initialize(image, hv_AllModelRow, hv_AllModelColumn, hv_AllModelAngle);
            var sMidLineModel = sMidLine.GetMidLine() as IMeasureGeoModel;

            var distance = DistanceHelper.LineToLine(fMidLineModel, sMidLineModel);

            mResult = new DistanceResult()
            {
                FirstRowBegin = fMidLineModel.Row1,
                FirstColBegin = fMidLineModel.Col1,
                FirstRowEnd = fMidLineModel.Row2,
                FirstColEnd = fMidLineModel.Col2,
                SecondRowBegin = sMidLineModel.Row1,
                SecondColBegin = sMidLineModel.Col1,
                SecondRowEnd = sMidLineModel.Row2,
                SecondColEnd = sMidLineModel.Col2,
                Angle = hv_AllModelAngle,
                Direction = LineDirection.Horizontal,
                Distance = distance,
            };
            return mResult;
        }