public cInformation(c3DWell CurrentBiologicalObject) { this.CurrentBiologicalObject = CurrentBiologicalObject; }
public void Display3Dplate(int IdxDescriptor, cPoint3D MinimumPosition) { ParentScreening._3DWorldForPlateDisplay.ListMetaObjectList = new List<cMetaBiologicalObjectList>(); cMetaBiologicalObjectList ListMetacells = new cMetaBiologicalObjectList("List Meta Objects"); ParentScreening._3DWorldForPlateDisplay.ListMetaObjectList.Add(ListMetacells); c3DWell NewPlate3D = new c3DWell(new cPoint3D(0, 0, 0), new cPoint3D(ParentScreening.Columns, ParentScreening.Rows, 1), Color.Black, null); NewPlate3D.SetOpacity(0.0); cMetaBiologicalObject Plate3D = new cMetaBiologicalObject(this.Name, ListMetacells, NewPlate3D); #region display the well list foreach (cWell TmpWell in this.ListWell) { if ((TmpWell == null) || (TmpWell.GetCurrentClassIdx() == -1)) continue; double PosZ = 8 - ((TmpWell.ListSignatures[IdxDescriptor].GetValue() - this.ListMinMax[IdxDescriptor][0]) * 8) / (this.ListMinMax[IdxDescriptor][1] - this.ListMinMax[IdxDescriptor][0]); double WellSize = (double)cGlobalInfo.OptionsWindow.numericUpDownWellSize.Value; double WellBorder = (1 - WellSize) / 2.0; cPoint3D CurrentPos = new cPoint3D(TmpWell.GetPosX() - WellBorder + MinimumPosition.X, TmpWell.GetPosY() + WellBorder + MinimumPosition.Y - WellSize / 2, PosZ + MinimumPosition.Z - WellBorder); Color WellColor = Color.Black; if (cGlobalInfo.IsDisplayClassOnly) WellColor = TmpWell.GetClassColor(); else { int ConvertedValue; byte[][] LUT = cGlobalInfo.CurrentPlateLUT; if (this.ListMinMax[IdxDescriptor][0] == this.ListMinMax[IdxDescriptor][1]) ConvertedValue = 0; else ConvertedValue = (int)(((TmpWell.ListSignatures[IdxDescriptor].GetValue() - this.ListMinMax[IdxDescriptor][0]) * (LUT[0].Length - 1)) / (this.ListMinMax[IdxDescriptor][1] - this.ListMinMax[IdxDescriptor][0])); if ((ConvertedValue >= 0) && (ConvertedValue < LUT[0].Length)) WellColor = Color.FromArgb(LUT[0][ConvertedValue], LUT[1][ConvertedValue], LUT[2][ConvertedValue]); } c3DWell New3DWell = new c3DWell(CurrentPos, new cPoint3D(CurrentPos.X + WellSize, CurrentPos.Y + WellSize, CurrentPos.Z + WellSize / 2.0), WellColor, TmpWell); New3DWell.SetType("[" + TmpWell.GetPosX() + " x " + TmpWell.GetPosY() + "]"); cPropertyType WellPropertyType = null; foreach (object item in cGlobalInfo.WindowHCSAnalyzer.toolStripDropDownButtonDisplayMode.DropDownItems) { if (item.GetType() == typeof(ToolStripMenuItem)) { ToolStripMenuItem TmpMenuItem = ((ToolStripMenuItem)item); if (TmpMenuItem.Checked && (TmpMenuItem.Tag != null) && (TmpMenuItem.Tag.GetType() == typeof(cPropertyType))) { WellPropertyType = ((cPropertyType)(TmpMenuItem).Tag); break; } } } if ((WellPropertyType != null) && (cGlobalInfo.ViewMode != eViewMode.PIE)) { Title MainLegend = new Title(); string ToDisp = ""; if (WellPropertyType != null) { object CurrentValue = TmpWell.ListProperties.FindValueByName(WellPropertyType.Name); if (CurrentValue != null) ToDisp = CurrentValue.ToString();//((double)CurrentValue).ToString("e4"); else ToDisp = "n.a."; } New3DWell.AddText(ToDisp, ParentScreening._3DWorldForPlateDisplay, 0.1); } New3DWell.SetOpacity((double)cGlobalInfo.OptionsWindow.numericUpDownWellOpacity.Value); ParentScreening._3DWorldForPlateDisplay.AddBiological3DObject(New3DWell); Plate3D.AddObject(New3DWell); } #endregion #region Well numbering if (cGlobalInfo.OptionsWindow.checkBox3DPlateInformation.Checked) { for (int i = 1; i <= ParentScreening.Columns; i++) { c3DText CurrentText = new c3DText(ParentScreening._3DWorldForPlateDisplay, i.ToString(), new cPoint3D(i - 1 + MinimumPosition.X, -0.5 + MinimumPosition.Y, 0 + MinimumPosition.Z), Color.White, 0.35); ParentScreening._3DWorldForPlateDisplay.AddGeometric3DObject(CurrentText); } for (int j = 1; j <= ParentScreening.Rows; j++) { c3DText CurrentText1; if (cGlobalInfo.OptionsWindow.radioButtonWellPosModeDouble.Checked) CurrentText1 = new c3DText(ParentScreening._3DWorldForPlateDisplay, j.ToString(), new cPoint3D(-1 + MinimumPosition.X, j - 0.5 + MinimumPosition.Y, 0 + MinimumPosition.Z), Color.White, 0.35); else CurrentText1 = new c3DText(ParentScreening._3DWorldForPlateDisplay, cGlobalInfo.ConvertIntPosToStringPos(j), new cPoint3D(-1 + MinimumPosition.X, j - 0.5 + MinimumPosition.Y, 0 + MinimumPosition.Z), Color.White, 0.35); ParentScreening._3DWorldForPlateDisplay.AddGeometric3DObject(CurrentText1); } } #endregion if (this.ListDRCRegions != null) { foreach (cDRC_Region Region in this.ListDRCRegions) { if (cGlobalInfo.OptionsWindow.checkBox1.Checked) { cDRC CurrentDRC = Region.GetDRC(this.ParentScreening.ListDescriptors[IdxDescriptor]); if ((CurrentDRC == null) || (CurrentDRC.ResultFit == null) || (CurrentDRC.ResultFit.Y_Estimated.Count <= 1)) continue; c3DDRC New3DDRC = new c3DDRC(CurrentDRC, Region, Color.White, this.ListMinMax[IdxDescriptor][0], this.ListMinMax[IdxDescriptor][1]); New3DDRC.SetOpacity((double)cGlobalInfo.OptionsWindow.numericUpDownDRCOpacity.Value); //New3DDRC.SetType("[" + TmpWell.GetPosX() + " x " + TmpWell.GetPosY() + "]"); ParentScreening._3DWorldForPlateDisplay.AddGeometric3DObject(New3DDRC); //Plate3D.AddObject(New3DDRC); } if (cGlobalInfo.OptionsWindow.checkBox3DComputeThinPlate.Checked) { c3DThinPlate NewThinPlate = new c3DThinPlate(Region, (double)cGlobalInfo.OptionsWindow.numericUpDown3DThinPlateRegularization.Value); if (cGlobalInfo.OptionsWindow.checkBox3DDisplayThinPlate.Checked) { NewThinPlate.SetOpacity(0.5); NewThinPlate.SetToWireFrame(); ParentScreening._3DWorldForPlateDisplay.AddGeometric3DObject(NewThinPlate); } if (cGlobalInfo.OptionsWindow.checkBox3DDisplayIsoboles.Checked) { for (double PosZContour = 0; PosZContour <= 10.0; PosZContour += 1.5) { c3DIsoContours NewContour = new c3DIsoContours(NewThinPlate, Region, Color.Red, PosZContour, true); ParentScreening._3DWorldForPlateDisplay.AddBiological3DObject(NewContour); } } if (cGlobalInfo.OptionsWindow.checkBox3DDisplayIsoRatioCurves.Checked) { // for (double PosZContour = 0; PosZContour <= 15.0; PosZContour += 3) { c3DIsoContours NewContour = new c3DIsoContours(NewThinPlate, Region, Color.Blue, 0/*PosZContour*/, false); ParentScreening._3DWorldForPlateDisplay.AddBiological3DObject(NewContour); } } } } } }