/// <summary> /// if the selection is changed in the listview the pictures have to be updated /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EuclidianListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { EuclidianListViewItem ecl = ((EuclidianListViewItem)e.AddedItems[0]); //transform List <List <Point> > points = Algorithm.DelaunayTriangulation.calculateDelaunayTrianglePoints(ecl.pointcloud); Post_knv_Server.DataIntegration.PointCloudDrawing.PointCloudPicturePackage pcpp = PointCloudDrawing.addTriangleToPicturePackage(refPointCloud.pictures, points); this._PointImageEuclid_Bottom.Source = pcpp.bottomview; this._PointImageEuclid_Front.Source = pcpp.frontview; this._PointImageEuclid_Side.Source = pcpp.sideview; } catch (Exception) { } }
/// <summary> /// function for the update of the listview & the stats /// </summary> private void UpdateListView() { this.Dispatcher.Invoke(() => { EuclidianListView.Items.Clear(); //add new items to the listview if (pointcloudList != null) { var np = pointcloudList.OrderByDescending(t => t.delaunayVolume); foreach (PointCloud pc in np) { bool origin = false; if (refList.Exists(t => t.Equals(pc))) { origin = true; } EuclidianListViewItem eLv = new EuclidianListViewItem() { pointcloud = pc, count = pc.count, cubicM = pc.delaunayVolume, selectCluster = origin }; EuclidianListView.Items.Add(eLv); } } //update the textblocks for the stats _Textblock_ClustersAboveLimit.Text = clustersAboveLimit.ToString(); _Textblock_ClustersTotal.Text = clustersTotal.ToString(); _Textblock_ExtractionRadius.Text = Config.ServerConfigManager._ServerConfigObject.serverAlgorithmConfig.euclidean_ExtractionRadius.ToString() + " m"; _Textblock_ExtractionVolumeLimit.Text = Config.ServerConfigManager._ServerConfigObject.serverAlgorithmConfig.euclidean_MinimumVolume.ToString() + " m"; _Textblock_PointsAboveLimit.Text = pointsAboveLimit.ToString(); _Textblock_PointsTotal.Text = pointsTotal.ToString(); _Textblock_VolumeAboveLimit.Text = volumeAboveLimit.ToString() + " m³"; _Textblock_VolumeTotal.Text = volumeTotal.ToString() + " m³"; }); }