示例#1
0
        private cFeedBackMessage Process()
        {
            cExtendedTable TmpTable = new cExtendedTable(this.Input[this.IdxColumnToProcess]);

            cSort S = new cSort();
            S.SetInputData(TmpTable);
            base.FeedBackMessage = S.Run();
            if (base.FeedBackMessage.IsSucceed == false) return base.FeedBackMessage;

            cNormalize N = new cNormalize();
            N.NormalizationType = eNormalizationType.STANDARDIZE;
            N.SetInputData(S.GetOutPut());
            base.FeedBackMessage = N.Run();
            if (base.FeedBackMessage.IsSucceed == false) return base.FeedBackMessage;

            int Num = N.GetOutPut()[0].Count;
            double[] CumulativeProba = new double[Num];
            for (int i = 1; i < Num - 1; i++)
                CumulativeProba[i] = (i - 0.3175) / (Num + 0.365);

            CumulativeProba[Num - 1] = Math.Pow(0.5, 1.0 / Num);
            CumulativeProba[0] = 1 - CumulativeProba[Num - 1];

            double[] PercentPointFunction = new double[Num];

            for (int i = 0; i < Num; i++)
                PercentPointFunction[i] = alglib.normaldistr.invnormaldistribution(CumulativeProba[i]);

            this.Output = new cExtendedTable(new cExtendedList(PercentPointFunction));

            this.Output.Add(new cExtendedList());

            this.Output.ListTags = new List<object>();

            for (int i = 0; i < N.GetOutPut()[0].Count; i++)
            {
                this.Output[1].Add(N.GetOutPut()[0][i]);
                if(S.GetOutPut()[0].ListTags!=null)
                this.Output.ListTags.Add(S.GetOutPut()[0].ListTags[i]);
            }

            this.Output[0].Name = "";
            this.Output[1].Name = "Normalized Data";

            return base.FeedBackMessage;
        }
示例#2
0
        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;
        }