示例#1
0
文件: Form1.cs 项目: worntunic/MMSHW
        private void HW_Filter_MeanThenSphere(object sender, EventArgs e)
        {
            int nWeight = GetIntInput();

            Console.WriteLine($"MeanThenSphere");
            m_Bitmap = StockFilters.MeanRemovalThenSphere(m_Bitmap, nWeight);
            this.Invalidate();
        }
示例#2
0
文件: Form1.cs 项目: worntunic/MMSHW
        private void HW_Filter_SphereOffCenter(object sender, EventArgs e)
        {
            int xMid = GetIntInput();
            int yMid = GetIntInput();

            Console.WriteLine($"SphereOffCenter");
            PixelPoint midPoint = new PixelPoint(xMid, yMid);

            m_Bitmap = StockFilters.Sphere(m_Bitmap, midPoint);
            this.Invalidate();
        }
示例#3
0
文件: Form1.cs 项目: worntunic/MMSHW
        private void HW_Filter_MeanThenSphereOffCenter(object sender, EventArgs e)
        {
            int        nWeight  = GetIntInput();
            int        xMid     = GetIntInput();
            int        yMid     = GetIntInput();
            PixelPoint midPoint = new PixelPoint(xMid, yMid);

            Console.WriteLine($"MeanThenSphereOffCenter{nWeight}:({xMid},{yMid})");
            MeanSphereConfig msConfig = new MeanSphereConfig(nWeight, PaddingType.Full, midPoint);

            m_Bitmap = StockFilters.MeanRemovalThenSphere(m_Bitmap, msConfig);
            this.Invalidate();
        }
示例#4
0
        public IHttpActionResult Get([FromBody] StockFilters stockFilters)
        {
            IHttpActionResult result;

            try
            {
                List <int> storeIds = stockFilters.Stores?.Any() ?? false?stockFilters.Stores.Select(x => x.Id).ToList() : null;

                result = Ok(this.stockService.Get(context, storeIds, stockFilters.ProductName).MapAll(true));
            }
            catch (Exception ex)
            {
                result = BadRequest(ex.Message);
            }

            return(result);
        }
示例#5
0
文件: Form1.cs 项目: worntunic/MMSHW
 private void HW_Filter_Sphere(object sender, EventArgs e)
 {
     Console.WriteLine($"Sphere");
     m_Bitmap = StockFilters.Sphere(m_Bitmap);
     this.Invalidate();
 }