Example #1
0
        public void Show_PartSearchingDefinitions(IEnumerable <PartSearchingDefinition> partSearchingDefinitions)
        {
            foreach (var ed in partSearchingDefinitions)
            {
                var regionIndicator = new RegionIndicatorViewModel
                {
                    StartPointX     = ed.RoiLine.X1,
                    StartPointY     = ed.RoiLine.Y1,
                    EndPointX       = ed.RoiLine.X2,
                    EndPointY       = ed.RoiLine.Y2,
                    RegionWidth     = ed.RoiHalfWidth,
                    Stroke          = Brushes.Orange,
                    StrokeThickness = 4,
                    IsHidden        = false,
                };
                RegionIndicators.Add(regionIndicator);

                var regionIndicator2 = new RegionIndicatorViewModel
                {
                    StartPointX     = ed.AreaLine.X1,
                    StartPointY     = ed.AreaLine.Y1,
                    EndPointX       = ed.AreaLine.X2,
                    EndPointY       = ed.AreaLine.Y2,
                    RegionWidth     = ed.AreaHalfWidth,
                    Stroke          = Brushes.Orange,
                    StrokeThickness = 4,
                    IsHidden        = false,
                };
                RegionIndicators.Add(regionIndicator2);
            }
        }
Example #2
0
        public void Show_RegionTargetResults(IEnumerable <RegionTargetResult> results)
        {
            foreach (var result in results)
            {
                if (result.HasError)
                {
                    continue;
                }

                var rect2   = result.TargetRegion.GetSmallestHRectangle2();
                var roiRect = rect2.GetRoiRectangle();

                if (result.Definition.Rect2Len1Line_DisplayEnabled)
                {
                    var line = roiRect.GetWidthLine();

                    var lineIndicator = new LineIndicatorViewModel
                    {
                        StartPointX     = line.X1,
                        StartPointY     = line.Y1,
                        EndPointX       = line.X2,
                        EndPointY       = line.Y2,
                        Stroke          = Brushes.DeepPink,
                        StrokeThickness = 2,
                    };
                    LineIndicators.Add(lineIndicator);
                }

                if (result.Definition.Rect2Len2Line_DisplayEnabled)
                {
                    var line = roiRect.GetLine();

                    var lineIndicator = new LineIndicatorViewModel
                    {
                        StartPointX     = line.X1,
                        StartPointY     = line.Y1,
                        EndPointX       = line.X2,
                        EndPointY       = line.Y2,
                        Stroke          = Brushes.DeepPink,
                        StrokeThickness = 2,
                    };
                    LineIndicators.Add(lineIndicator);
                }

                var regionIndicator2 = new RegionIndicatorViewModel
                {
                    StartPointX     = roiRect.StartX,
                    StartPointY     = roiRect.StartY,
                    EndPointX       = roiRect.EndX,
                    EndPointY       = roiRect.EndY,
                    RegionWidth     = roiRect.ROIWidth,
                    Stroke          = Brushes.Lime,
                    StrokeThickness = 2,
                    IsHidden        = false,
                };
                RegionIndicators.Add(regionIndicator2);
            }
        }
Example #3
0
 public void Show_RegionTargetDefinitions(IEnumerable <RegionTargetDefinition> definitions)
 {
     foreach (var ed in definitions)
     {
         var regionIndicator = new RegionIndicatorViewModel
         {
             StartPointX     = ed.RoiActualLine.X1,
             StartPointY     = ed.RoiActualLine.Y1,
             EndPointX       = ed.RoiActualLine.X2,
             EndPointY       = ed.RoiActualLine.Y2,
             RegionWidth     = ed.RoiHalfWidth,
             Stroke          = Brushes.Orange,
             StrokeThickness = 4,
             IsHidden        = false,
         };
         RegionIndicators.Add(regionIndicator);
     }
 }
Example #4
0
 public void Show_EdgeSearchingDefinitions(IEnumerable <EdgeSearchingDefinition> edgeSearchingDefinitions)
 {
     foreach (var ed in edgeSearchingDefinitions)
     {
         var regionIndicator = new RegionIndicatorViewModel
         {
             StartPointX     = ed.StartX,
             StartPointY     = ed.StartY,
             EndPointX       = ed.EndX,
             EndPointY       = ed.EndY,
             RegionWidth     = ed.ROIWidth,
             Stroke          = Brushes.Orange,
             StrokeThickness = 4,
             IsHidden        = false,
         };
         RegionIndicators.Add(regionIndicator);
     }
 }
Example #5
0
        public void Show_PartSearchingResults(IEnumerable <PartSearchingResult> partSearchingResults)
        {
            foreach (var edgeSearchingResult in partSearchingResults)
            {
                if (edgeSearchingResult.HasError)
                {
                    continue;
                }

                var regionIndicator2 = new RegionIndicatorViewModel
                {
                    StartPointX     = edgeSearchingResult.PartLine.X1,
                    StartPointY     = edgeSearchingResult.PartLine.Y1,
                    EndPointX       = edgeSearchingResult.PartLine.X2,
                    EndPointY       = edgeSearchingResult.PartLine.Y2,
                    RegionWidth     = edgeSearchingResult.PartHalfWidth,
                    Stroke          = Brushes.Lime,
                    StrokeThickness = 2,
                    IsHidden        = false,
                };
                RegionIndicators.Add(regionIndicator2);
            }
        }