private void dToolStripMenuItemScatterPlot3D_Click(object sender, EventArgs e) { int MaxNumberOfPts = (int)cGlobalInfo.OptionsWindow.FFAllOptions.numericUpDownMinNumPointForFastDisp.Value; if (cGlobalInfo.CurrentScreening.ListPlatesActive.GetListActiveWells().Count > MaxNumberOfPts) { cExtendedTable ET = cGlobalInfo.CurrentScreening.ListPlatesActive.GetListActiveWells().GetAverageDescriptorValues(cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptors(), false, false); cNormalize N = new cNormalize(); N.SetInputData(ET); N.NormalizationType = eNormalizationType.MIN_MAX; N.Run(); cExtendedTable NormTable = N.GetOutPut(); cViewer3D V3D = new cViewer3D(); c3DPointCloud _3DPtCloud = new c3DPointCloud(NormTable); _3DPtCloud.AutomatedPtColorMode = 1; _3DPtCloud.Create(new cPoint3D(0, 0, 0)); _3DPtCloud.SetName("_3DPtCloud"); cListGeometric3DObject GlobalList = new cListGeometric3DObject("3D Point Cloud MetaObject"); GlobalList.Add(_3DPtCloud); c3DObject_Axis Axis = new c3DObject_Axis(); cExtendedTable T = new cExtendedTable(); T.Add(new cExtendedList(ET[0].Name)); T[0].Tag = ET[0].Tag; T[0].Add(0); T[0].Add(1); T.Add(new cExtendedList(ET[1].Name)); T[1].Tag = ET[1].Tag; T[1].Add(0); T[1].Add(1); if (ET.Count > 2) { T.Add(new cExtendedList(ET[2].Name)); T[2].Tag = ET[2].Tag; T[2].Add(0); T[2].Add(1); } Axis.SetInputData(T); c3DNewWorld MyWorld = new c3DNewWorld(new cPoint3D(1, 1, 1), new cPoint3D(1, 1, 1)); Axis.Run(MyWorld); GlobalList.AddRange(Axis.GetOutPut()); // GlobalList.Add(Axis); foreach (var item in GlobalList) { MyWorld.AddGeometric3DObject(item); } // MyWorld.BackGroundColor = cGlobalInfo.OptionsWindow.FFAllOptions.panelFor3DBackColor.BackColor; V3D.SetInputData(MyWorld); V3D.Run(); cDisplayToWindow DTW = new cDisplayToWindow(); DTW.SetInputData(V3D.GetOutPut()); DTW.Title = "3D Cloud Point - " + ET[0].Count + " points"; DTW.Run(); DTW.Display(); } else { cGlobalInfo.OptionsWindow.checkBoxConnectDRCPts.Checked = false; FormFor3DDataDisplay FormToDisplayXYZ = new FormFor3DDataDisplay(ProcessModeEntireScreeningToolStripMenuItem.Checked, cGlobalInfo.CurrentScreening); for (int i = 0; i < (int)cGlobalInfo.CurrentScreening.ListDescriptors.Count; i++) { FormToDisplayXYZ.comboBoxDescriptorX.Items.Add(cGlobalInfo.CurrentScreening.ListDescriptors[i].GetName()); FormToDisplayXYZ.comboBoxDescriptorY.Items.Add(cGlobalInfo.CurrentScreening.ListDescriptors[i].GetName()); FormToDisplayXYZ.comboBoxDescriptorZ.Items.Add(cGlobalInfo.CurrentScreening.ListDescriptors[i].GetName()); } FormToDisplayXYZ.Show(); FormToDisplayXYZ.comboBoxDescriptorX.Text = cGlobalInfo.CurrentScreening.ListDescriptors[0].GetName() + " "; FormToDisplayXYZ.comboBoxDescriptorY.Text = cGlobalInfo.CurrentScreening.ListDescriptors[0].GetName() + " "; FormToDisplayXYZ.comboBoxDescriptorZ.Text = cGlobalInfo.CurrentScreening.ListDescriptors[0].GetName() + " "; } return; }
public void CurrentPanel_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(cImage))) { cImage SourceImage = (cImage)e.Data.GetData(typeof(cImage)); if (SourceImage.Depth > 1) { int CurrentChannel = 1; UserControlSingleLUT SingleLUT = (UserControlSingleLUT)SourceImage.AssociatedImagePanel.LUTManager.panelForLUTS.Controls[CurrentChannel]; Input.AddVolume3D(new cVolumeRendering3D(SourceImage.SingleChannelImage[CurrentChannel], new cPoint3D(0, 0, 0), SingleLUT.SelectedLUT, Input)); } else { c3DTexturedPlan _3DPlan = new c3DTexturedPlan(new cPoint3D(0, 0, 0), SourceImage); _3DPlan.Run(); Input.AddGeometric3DObject(_3DPlan); } this.iren.Render(); } else if (e.Data.GetDataPresent(typeof(cListWells))) { cListWells TmpList = (cListWells)e.Data.GetData(typeof(cListWells)); if (MessageBox.Show("Do you want perform this opereation at a single cell level ?", "3D Drop", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { TmpList.BuildAndDisplaySingleCell3DScatterCloud(this); } else { cExtendedTable TB = TmpList.GetAverageDescriptorValues(cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptors(), false, false); c3DPointCloud PC = new c3DPointCloud(TB); PC.Create(new cPoint3D(0, 0, 0)); Input.AddGeometric3DObject(PC); this.iren.Render(); } } }