public static PEGMoveViewModel GetPEGMoveModel(int objectWidth, int objectHeight, CameraSpecViewModel spec, bool isYOnly)
        {
            PEGMoveViewModel model = null;
            var verticalPixels = Math.Ceiling(objectHeight / spec.HorizontalPixelSize);
            var yMovelPixelTimes = Math.Ceiling(verticalPixels / spec.HorizontalResolution);
            var yMovePixel = yMovelPixelTimes * spec.HorizontalResolution;
            model = new PEGMoveViewModel()
            {
                XMovePixel = 0,
                XMoveLoop = 1,
                YMovePixel = (int)yMovePixel,
                YMoveLoop = 1,

            };
            return model;
        }
        /// <summary>
        /// 取得 PEGMoveModel
        /// </summary>
        /// <param name="objectWidth">受測物長度, X 方向 (um)</param>
        /// <param name="objectHeight">受測物寬度, Y 方向 (um)</param>
        /// <param name="spec">Line Scan Camera 的規格 ( Resolution, Pixel Szie, Scan Rate, exposeTime)</param>
        /// <returns></returns>
        public static PEGMoveViewModel GetPEGMoveModel(int objectWidth, int objectHeight, CameraSpecViewModel spec)
        {
            PEGMoveViewModel model = null;
            var xMoveLoop = getMoveLoopCount(objectWidth, spec.HorizontalResolution, spec.HorizontalPixelSize);
            var xMovePixel = getMovePixel(objectWidth, xMoveLoop, spec.HorizontalPixelSize);

            var yMoveLoop = getMoveLoopCount(objectHeight, spec.VerticalResolution, spec.VerticalPixelSize);
            yMoveLoop = 0;
            var yMovePixel = getMovePixel(objectHeight, yMoveLoop, spec.VerticalPixelSize);

            model = new PEGMoveViewModel()
            {
                XMovePixel = xMovePixel,
                XMoveLoop = xMoveLoop,
                YMovePixel = yMovePixel,
                YMoveLoop = yMoveLoop,

            };
            return model;
        }