private void OnLearnShapeModelButtonClick(object sender, RoutedEventArgs e)
        {
            this.shapeModel = ShapeModel.Learn(
                from imageInfo in this.imageInfos select imageInfo.Shape.FitToSize(this.algorithmProperties.LearnedObjectSize, this.algorithmProperties.LearnedObjectSize),
                this.shapeModel.ConstrainedEdgePairs);

            for (int i = 0; i < this.shapeModel.Structure.Edges.Count; ++i)
            {
                ShapeEdgeParams @params = this.shapeModel.GetEdgeParams(i);
                LogMessage("Edge {0}: mean width ratio is {1:0.000}, deviation is {2:0.000}", i, @params.WidthToEdgeLengthRatio, @params.WidthToEdgeLengthRatioDeviation);
            }

            foreach (Tuple <int, int> constrainedEdgePair in this.shapeModel.ConstrainedEdgePairs)
            {
                ShapeEdgePairParams @params = this.shapeModel.GetEdgePairParams(
                    constrainedEdgePair.Item1, constrainedEdgePair.Item2);
                LogMessage("Edge pair ({0}, {1}):", constrainedEdgePair.Item1, constrainedEdgePair.Item2);
                LogMessage("mean length ratio is {0}, deviation is {1}", @params.MeanLengthRatio, @params.LengthDiffDeviation);
                LogMessage("mean angle is {0}, deviation is {1}", @params.MeanAngle, @params.AngleDeviation);
            }
        }