public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            if (aSlab.TopLines != null) {
                for (var i = 0; i < aSlab.TopLines.Length; ++i) {
                    FilterLeftView(aSlab.TopLines[i]);
                }
            }

            if (aSlab.BottomLines != null) {
                for (var i = 0; i < aSlab.BottomLines.Length; ++i) {
                    FilterLeftView(aSlab.BottomLines[i]);
                }
            }

            if (aSlab.LeftLines != null) {
                for (var i = 0; i < aSlab.LeftLines.Length; ++i) {
                    FilterTopView(aSlab.LeftLines[i]);
                }
            }

            if (aSlab.RightLines != null) {
                for (var i = 0; i < aSlab.RightLines.Length; ++i) {
                    FilterTopView(aSlab.RightLines[i]);
                }
            }
        }
        public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            var bottomLine = aSlab.BottomLines[aSlab.BottomLines.Length/2];
            var topLine = aSlab.TopLines[aSlab.TopLines.Length/2];
            for (var i = 0; i < bottomLine.Length - 1; ++i) {
                var bottomBump = GetBump(bottomLine[i], bottomLine[i + 1]);
                if (Math.Abs(bottomBump) >= MIN_BUMP) {
                    for (var j = -4; j <= 4; ++j) {
                        if (i + j >= 0 &&
                            i + j < bottomLine.Length - 1 &&
                            i+j < topLine.Length - 1) {
                            var topBump = GetBump(topLine[i+j], topLine[i+j+1]);
                            if (Math.Abs(topBump) >= MIN_BUMP) {
                                if (topBump * bottomBump > 0 && // если имеют одинаковые направления.
                                    Math.Abs(topBump - bottomBump) <= MAX_DIFFERENCE) {
                                    FilterBump(bottomLine, i + 1, bottomBump);
                                    FilterBump(topLine, i + j + 1, topBump);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        private const int WINDOW_SIZE = 20; // размер окна для вычисления среднего.

        #endregion Fields

        #region Methods

        public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            for (var i = 0; i < aSlab.TopLines.Length; ++i) {
                var segments = FindVerticalSegments(aSlab.TopLines[i]);
                FilterVerticalLine(aSlab.TopLines[i], segments);
            }

            for (var i = 0; i < aSlab.BottomLines.Length; ++i) {
                var segments = FindVerticalSegments(aSlab.BottomLines[i]);
                FilterVerticalLine(aSlab.BottomLines[i], segments);
            }

            for (var i = 0; i < aSlab.LeftLines.Length; ++i) {
                var segments = FindHorizontalSegments(aSlab.LeftLines[i]);
                FilterHorizontLine(aSlab.LeftLines[i], segments);
            }

            for (var i = 0; i < aSlab.RightLines.Length; ++i) {
                var segments = FindHorizontalSegments(aSlab.RightLines[i]);
                FilterHorizontLine(aSlab.RightLines[i], segments);
            }
        }
        public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            if (aSlab.CenterLine != null) {
                FilterBumps(aSlab.CenterLine);
            }            
        }
 public static void Filter(SlabModelImpl aSlab)
 {            
     if (aSlab == null) {
         return;
     }
     
     FilterTopView(ref aSlab.LeftSensorLine);
     FilterTopView(ref aSlab.RightSensorLine);
     FilterLeftView(ref aSlab.TopSensorLine);
     FilterLeftView(ref aSlab.BottomSensorLine);
 }
        private const int WINDOW_SIZE = 50; // размер окна для вычисления среднего.

        #endregion Fields

        #region Methods

        public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            if (aSlab.Diameters != null) {
                FilterDiameters(aSlab.Diameters);
            }

            if (aSlab.CenterLine != null) {
                FilterCenters(aSlab.CenterLine);
            }
        }
        public static void Filter(SlabModelImpl aSlab)
        {
            if (aSlab == null) {
                return;
            }

            var linesCount = aSlab.LeftLines.Length;
            for (var i = 0; i < linesCount; ++i) {
                if (i >= aSlab.RightLines.Length) {
                    return;
                }

                var leftLine = aSlab.LeftLines[i];
                var rightLine = aSlab.RightLines[i];

                FilterRotate(leftLine, rightLine);
            }
        }