private DepthMap CreateMap(Cluster cluster) { var map = new int[(int)cluster.Width + 1, (int)cluster.Height + 1]; foreach (var point in cluster.AllPoints) { map[(int)(point.X - cluster.X), (int)(point.Y - cluster.Y)] = (int)point.Z; } return new DepthMap(map); }
private void DrawClusterPoints(Cluster cluster, Brush brush, DrawingContext drawingContext) { foreach (var point in cluster.Points) { drawingContext.DrawRectangle(brush, null, new Rect(point.X, point.Y, clusterPointSize, clusterPointSize)); } }
private Contour CreateContour(DepthMap map, Cluster cluster) { return this.contourFactory.CreateContour(map, cluster.X, cluster.Y); }
private void DrawCenter(Cluster cluster, DrawingContext drawingContext) { drawingContext.DrawEllipse(Brushes.Blue, null, new System.Windows.Point(cluster.Center.X, cluster.Center.Y), centerSize, centerSize); }