Beispiel #1
0
        public Positioning()
        {
            Form = new FormPositioning(this);

            var inputImage = new ToolInput("输入图片", this.Name)
            {
                Item = new HImage()
            };

            Input.Add(inputImage);
            var outputImage = new ToolOutput("输出图片", this.Name)
            {
                Item = new HImage()
            };

            Output.Add(outputImage);
        }
Beispiel #2
0
        private HighSpeedDataCallBack _callback; //回调

        public SSZNAcquisition()
        {
            Form = new FormSSZNAcquisitio(this);

            var outputImage = new ToolOutput("输出图片", this.Name)
            {
                Item = new HObject()
            };

            Output.Add(outputImage);

            _heightData = new int[15000 * 6400];
            for (var i = 0; i < _heightData.Length; i++)
            {
                _heightData[i] = -1000000;
            }
            _callback = ReceiveHighSpeedData;
        }
Beispiel #3
0
        public TemplateMatching()
        {
            var inputImage = new ToolInput("输入图片", this.Name)
            {
                Item = new HImage()
            };

            Input.Add(inputImage);

            var outputImage = new ToolOutput("输出结果", this.Name)
            {
                Item = new FindModelResult()
            };

            Output.Add(outputImage);

            Form = new FormModel(this);
        }
Beispiel #4
0
        //---------------------------------------------------------------------------------
        /// <summary>
        /// Run the command asynchrounously and return the console output
        /// </summary>
        //---------------------------------------------------------------------------------
        public Task <ToolOutput> RunAsync(params string[] args)
        {
            return(Task.Run(() =>
            {
                var output = new ToolOutput();
                var process = new Process();
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardError = true;
                process.OutputDataReceived += (sender, eventsArgs) => output.AddStdOut(eventsArgs.Data);
                process.ErrorDataReceived += (sender, eventsArgs) => output.AddStdError(eventsArgs.Data);
                process.StartInfo.Arguments = string.Join(" ", args);
                process.StartInfo.FileName = Path;

                process.Start();
                process.BeginOutputReadLine();
                process.WaitForExit();
                process.CancelOutputRead();
                return output;
            }));
        }
        public SmartRayAcquisition()
        {
            Form = new FormSmartRayAcquisition(this);

            var inputInt = new ToolInput("输入整数", this.Name)
            {
                Item = 15
            };

            Input.Add(inputInt);
            var inputImage = new ToolInput("输入图片", this.Name)
            {
                Item = new HImage()
            };

            Input.Add(inputImage);
            var outputImage = new ToolOutput("输出图片", this.Name)
            {
                Item = new HImage()
            };

            Output.Add(outputImage);
        }