Example #1
0
        public cBuildDensityMap()
        {
            Title = "Build Density Map";

            cPropertyType CPT = new cPropertyType("Kernel size", eDataType.INTEGER);
            CPT.Min = 1;
            cProperty Prop1 = new cProperty(CPT, null);
            Prop1.Info = "Size of the kernel";
            Prop1.SetNewValue((int)10);
            base.ListProperties.Add(Prop1);

            cPropertyType CPT2 = new cPropertyType("Image width", eDataType.INTEGER);
            CPT2.Min = 1;
            cProperty Prop2 = new cProperty(CPT2, null);
            Prop2.Info = "Width of the density map image";
            Prop2.SetNewValue((int)256);
            base.ListProperties.Add(Prop2);

            cPropertyType CPT3 = new cPropertyType("Image height", eDataType.INTEGER);
            CPT3.Min = 1;
            cProperty Prop3 = new cProperty(CPT3, null);
            Prop3.Info = "Height of the density map image";
            Prop3.SetNewValue((int)256);
            base.ListProperties.Add(Prop3);

            cPropertyType CPT4 = new cPropertyType("Image depth", eDataType.INTEGER);
            CPT4.Min = 1;
            cProperty Prop4 = new cProperty(CPT4, null);
            Prop4.Info = "Depth of the density map image";
            Prop4.SetNewValue((int)256);
            base.ListProperties.Add(Prop4);
        }
Example #2
0
        public cImageGeometricFlip()
        {
            this.Title = "Flip ";

            cProperty Prop1 = new cProperty(new cPropertyType("Horizontal", eDataType.BOOL), null);
            Prop1.Info = "Horizontal Flip?";
            Prop1.SetNewValue((bool)true);
            base.ListProperties.Add(Prop1);
        }
        public cImageSegmentationThreshold()
        {
            this.Title = "Threshold";

            cProperty Prop1 = new cProperty(new cPropertyType("Threshold", eDataType.DOUBLE), null);
            Prop1.Info = "Intensity threshold";
            Prop1.SetNewValue((double)100);
            base.ListProperties.Add(Prop1);
        }
Example #4
0
        public cImageFilterMedian()
        {
            this.Title = "Median Filtering";

            cProperty Prop1 = new cProperty(new cPropertyType("Kernel Size", eDataType.INTEGER), null);
            Prop1.Info = "Median Kernel size";
            Prop1.SetNewValue((int)3);
            base.ListProperties.Add(Prop1);
        }
Example #5
0
        public cGetImageFromWells()
        {
            this.Title = "Get Wells List Image";

            cPropertyType PT = new cPropertyType("Field", eDataType.INTEGER);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Field";
            Prop1.SetNewValue((int)0);
            base.ListProperties.Add(Prop1);
        }
Example #6
0
        public cGetListWellValues()
        {
            this.Title = "Get Well Values List";

            cPropertyType PT = new cPropertyType("Include Images?", eDataType.BOOL);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Include Images Within the Data (if avalaible).";
            Prop1.SetNewValue((bool)false);
            base.ListProperties.Add(Prop1);
        }
Example #7
0
        public cTableToHTML()
        {
            base.Title = "Table to HTML";
            base.Info = "Write a table in a HTML file (if Tags are images, they are saved as well).";

            cPropertyType PT = new cPropertyType("Open HTML File ?", eDataType.BOOL);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Open Web browser to display the generated HTML file";
            Prop1.SetNewValue((bool)true);
            base.ListProperties.Add(Prop1);
        }
        //  public double StdDev = 3.0;
        public cImageFilterGaussianConvolution()
        {
            this.Title = "Gaussian Convolution";

            cPropertyType PT = new cPropertyType("Kernel Size", eDataType.INTEGER);
            PT.IntType = eIntegerType.ODD;
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Gaussian kernel size";
            Prop1.SetNewValue((int)3);
            base.ListProperties.Add(Prop1);
        }
        public cImageGeometricBinning()
        {
            this.Title = "Binning";

            cProperty Prop2 = new cProperty(new cPropertyType("Binning", eDataType.INTEGER),null);
            Prop2.PropertyType.Min = 2;
            Prop2.PropertyType.IntType = eIntegerType.EVEN;
            Prop2.Info = "Define the new image binning.";
            Prop2.SetNewValue((int)2);
            base.ListProperties.Add(Prop2);
        }
        public cViewerStackedHistogram()
        {
            this.Title = "Stacked Histogram Viewer";

            cPropertyType PT = new cPropertyType("Bin Number", eDataType.INTEGER);
            PT.Min = -1;
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Number of bins (-1 <=> automated)";
            Prop1.SetNewValue((int)100);
            base.ListProperties.Add(Prop1);
        }
Example #11
0
        public cClustering()
        {
            base.Title = "Clustering";
            base.Info = base.Info = @"Multivariate Clustering";

            cPropertyType PT1 = new cPropertyType("Number of Clusters", eDataType.INTEGER);
            PT1.Min = -1;
            cProperty Prop1 = new cProperty(PT1, null);

            Prop1.Info = "Define the request number of clusters (-1 <=> automated)";
            Prop1.SetNewValue((int)3);
            base.ListProperties.Add(Prop1);
        }
Example #12
0
        //   public double Scale = 0.5;
        public cImageGeometricResize()
        {
            this.Title = "Resize ";

            cProperty Prop1 = new cProperty(new cPropertyType("Scale", eDataType.DOUBLE), null);
            Prop1.Info = "Resizing scale";
            Prop1.SetNewValue((double)0.5);
            base.ListProperties.Add(Prop1);

            cProperty Prop2 = new cProperty(new cPropertyType("Maximum Width", eDataType.INTEGER),null);
            Prop2.PropertyType.Min = 0;
            Prop2.Info = "Define the maximum width of the image. If set to 0, then unlimited";
            Prop2.SetNewValue((int)0);
            base.ListProperties.Add(Prop2);
        }
        public cvtkPiecewiseFunctionBuilder()
        {
            base.Title = "vtkPiecewiseFunction builder";

            cPropertyType PT = new cPropertyType("Max. Opacity", eDataType.DOUBLE);
            PT.Max = 1;
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Maximum Opacity";
            Prop1.SetNewValue((double)0.1);
            base.ListProperties.Add(Prop1);

            cPropertyType PT1 = new cPropertyType("Min. Opacity", eDataType.DOUBLE);
            PT1.Max = 1;
            cProperty Prop2 = new cProperty(PT1, null);
            Prop2.Info = "Minimum Opacity";
            Prop2.SetNewValue((double)0.1);
            base.ListProperties.Add(Prop2);
        }
Example #14
0
        public cDisplayNewImage()
        {
            this.Title = "Generate Image";

            cProperty PropWidth = new cProperty(new cPropertyType("Width", eDataType.INTEGER), null);
            PropWidth.Info = "Image Width";
            PropWidth.SetNewValue((int)256);
            base.ListProperties.Add(PropWidth);

            cProperty PropHeight = new cProperty(new cPropertyType("Height", eDataType.INTEGER), null);
            PropHeight.Info = "Image Height";
            PropHeight.SetNewValue((int)256);
            base.ListProperties.Add(PropHeight);

            cProperty PropDepth = new cProperty(new cPropertyType("Depth", eDataType.INTEGER), null);
            PropDepth.Info = "Image Depth";
            PropDepth.SetNewValue((int)1);
            base.ListProperties.Add(PropDepth);
        }
Example #15
0
        public cDisplayListWell3DDRC()
        {
            this.Title = "List Wells 3D Plot";

            cPropertyType PTDesc1 = new cPropertyType("Desc. 1", eDataType.STRING);
            PTDesc1.ListPotentialString = cGlobalInfo.CurrentScreening.ListDescriptors.GetListNames();
            cProperty PropDesc1 = new cProperty(PTDesc1, null);

            cPropertyType PTDesc2 = new cPropertyType("Desc. 2", eDataType.STRING);
            PTDesc2.ListPotentialString = cGlobalInfo.CurrentScreening.ListDescriptors.GetListNames();
            cProperty PropDesc2 = new cProperty(PTDesc2, null);

            cPropertyType PTDesc3 = new cPropertyType("Desc. 3", eDataType.STRING);
            PTDesc3.ListPotentialString = cGlobalInfo.CurrentScreening.ListDescriptors.GetListNames();
            cProperty PropDesc3 = new cProperty(PTDesc3, null);

            PropDesc1.Info = "Specify the X axis associated descriptor.";
            base.ListProperties.Add(PropDesc1);
            PropDesc2.Info = "Specify the Y axis associated descriptor.";
            base.ListProperties.Add(PropDesc2);
            PropDesc3.Info = "Specify the Z axis associated descriptor.";
            base.ListProperties.Add(PropDesc3);

            cPropertyType PT = new cPropertyType("Normalized ?", eDataType.BOOL);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Perform Min-Max normalization of the data.";
            Prop1.SetNewValue((bool)false);
            base.ListProperties.Add(Prop1);

            cPropertyType PT2 = new cPropertyType("Draw Axis ?", eDataType.BOOL);
            cProperty Prop2 = new cProperty(PT2, null);
            Prop2.Info = "Draw data associated axis";
            Prop2.SetNewValue((bool)true);
            base.ListProperties.Add(Prop2);

            cPropertyType PT3 = new cPropertyType("Link Points ?", eDataType.BOOL);
            cProperty Prop3 = new cProperty(PT3, null);
            Prop3.Info = "Draw lines sequentialy between the points";
            Prop3.SetNewValue((bool)true);
            base.ListProperties.Add(Prop3);
        }
Example #16
0
        public c3DObjectScatterPoints()
        {
            Title = "3D Scatter Points Graph";

            cPropertyType PT = new cPropertyType("Normalized ?", eDataType.BOOL);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Perform Min-Max normalization of the data.";
            Prop1.SetNewValue((bool)false);
            base.ListProperties.Add(Prop1);

            cPropertyType PT2 = new cPropertyType("Draw Axis ?", eDataType.BOOL);
            cProperty Prop2 = new cProperty(PT2, null);
            Prop2.Info = "Draw data associated axis";
            Prop2.SetNewValue((bool)true);
            base.ListProperties.Add(Prop2);

            cPropertyType PT3 = new cPropertyType("Link Points ?", eDataType.BOOL);
            cProperty Prop3 = new cProperty(PT3, null);
            Prop3.Info = "Draw lines sequentialy between the points";
            Prop3.SetNewValue((bool)true);
            base.ListProperties.Add(Prop3);
        }
Example #17
0
        public c3DObjectMeshFromImage()
        {
            Title = "3D mesh from image";

            cPropertyType PT = new cPropertyType("Thresold", eDataType.DOUBLE);
            cProperty Prop1 = new cProperty(PT, null);
            Prop1.Info = "Threshold value for binarization";
            Prop1.SetNewValue((double)0.5);
            base.ListProperties.Add(Prop1);

            cPropertyType PT2 = new cPropertyType("Split objects ?", eDataType.BOOL);
            cProperty Prop2 = new cProperty(PT2, null);
            Prop2.Info = "Split objects during the segmentation process";
            Prop2.SetNewValue((bool)true);
            base.ListProperties.Add(Prop2);

            //cPropertyType PT3 = new cPropertyType("Link Points ?", eDataType.BOOL);
            //cProperty Prop3 = new cProperty(PT3, null);
            //Prop3.Info = "Draw lines sequentialy between the points";
            //Prop3.SetNewValue((bool)true);
            //base.ListProperties.Add(Prop3);
        }
        private void buttonOk_Click(object sender, EventArgs e)
        {
            if ((this.panelMainFilterDesc.Controls.Count == 0) && (this.panelMainFilterProp.Controls.Count == 0)) return;

            int HitClass = HitClassPanel.GetListIndexSelectedClass()[0];
            int NonHitClass = NonHitClassPanel.GetListIndexSelectedClass()[0];

            // parse the plates
            foreach (var TmpPlate in PlatesSelectionPanel.GetListSelectedPlates())
            {
                // check if the class has to be processed
                cListWells TmpListWell = TmpPlate.ListWells.Filter(WellClassSelectionPanel.GetListSelectedClassTypes());

                foreach (var TmpWell in TmpListWell)
                {
                    bool IsHit = false;

                    #region filter the descriptors
                    // get the value associated to the selected descriptor
                    int IDxPanel = 0;
                    foreach (var TmpFilter in this.panelMainFilterDesc.Controls)
                    {
                        double Value = TmpWell.GetAverageValue(cGlobalInfo.CurrentScreening.ListDescriptors.GetDescriptorByName(this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxForDescName.Text));
                        double ValueTobeComparedTo = 0;
                        if (this.ListFormForPanelFilterDescHits[IDxPanel].radioButtonManual.Checked)
                            ValueTobeComparedTo = (double)this.ListFormForPanelFilterDescHits[IDxPanel].numericUpDownManualValue.Value;
                        else
                            ValueTobeComparedTo = (double)this.ListFormForPanelFilterDescHits[IDxPanel].numericUpDownZScoreValue.Value;

                        if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == ">")
                        {
                            if (Value > ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                TmpWell.SetClass(NonHitClass);
                                break;
                            }
                        }
                        else if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == "<")
                        {
                            if (Value > ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                TmpWell.SetClass(NonHitClass);
                                break;
                            }

                        }
                        else if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == ">=")
                        {
                            if (Value >= ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                TmpWell.SetClass(NonHitClass);
                                break;
                            }

                        }
                        else if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == "<=")
                        {
                            if (Value <= ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                TmpWell.SetClass(NonHitClass);
                                break;
                            }

                        }
                        else if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == "=")
                        {
                            if (Value == ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                TmpWell.SetClass(NonHitClass);
                                break;
                            }

                        }
                        else if (this.ListFormForPanelFilterDescHits[IDxPanel].comboBoxComparison.Text == "!=")
                        {
                            if (Value != ValueTobeComparedTo) IsHit = true;
                            else
                            {
                                IsHit = false;
                                break;
                            }

                        }

                        IDxPanel++;
                    }
                    #endregion

                 //   if (!IsHit) continue;

                    #region Filter the properties
                    // get the value associated to the selected descriptor
                    IDxPanel = 0;// this.ListFormForPanelFilterPropertyHits.Count - 1;

                    foreach (var TmpFilter in this.panelMainFilterProp.Controls)
                    {
                        cProperty ObjValue = TmpWell.ListProperties.FindPropertyByName(this.ListFormForPanelFilterPropertyHits[IDxPanel].comboBoxForPropertyName.Text);

                        if (ObjValue == null) continue;

                        eComparison Comparison = eComparison.E;
                        switch (this.ListFormForPanelFilterPropertyHits[IDxPanel].comboBoxPropertyComparison.Text)
                        {
                            case ">":
                                Comparison = eComparison.HT; break;
                            case "<":
                                Comparison = eComparison.LT; break;
                            case ">=":
                                Comparison = eComparison.HET; break;
                            case "<=":
                                Comparison = eComparison.LET; break;
                            case "=":
                                Comparison = eComparison.E; break;
                            case "!=":
                                Comparison = eComparison.NE; break;
                            case "C":
                                Comparison = eComparison.I; break;
                            case "!C":
                                Comparison = eComparison.NI; break;
                            default:
                                continue;
                                break;
                        }

                        //object
                        cProperty TmpProp = null;

                        if (ObjValue.PropertyType.Type == eDataType.DOUBLE)
                        {
                            TmpProp = new cProperty(new cPropertyType("", eDataType.DOUBLE), (double)this.ListFormForPanelFilterPropertyHits[IDxPanel].numericUpDownValuePropToBeCompared.Value);
                        }
                        else if (ObjValue.PropertyType.Type == eDataType.INTEGER)
                        {
                            TmpProp = new cProperty(new cPropertyType("", eDataType.INTEGER), (int)this.ListFormForPanelFilterPropertyHits[IDxPanel].numericUpDownValuePropToBeCompared.Value);
                        }
                        else if (ObjValue.PropertyType.Type == eDataType.BOOL)
                        {
                            if ((int)this.ListFormForPanelFilterPropertyHits[IDxPanel].numericUpDownValuePropToBeCompared.Value == 1)
                                TmpProp = new cProperty(new cPropertyType("", eDataType.BOOL), true);
                            else
                                TmpProp = new cProperty(new cPropertyType("", eDataType.BOOL), false);
                        }
                        else if (ObjValue.PropertyType.Type == eDataType.STRING)
                        {
                            TmpProp = new cProperty(new cPropertyType("", eDataType.STRING), (string)this.ListFormForPanelFilterPropertyHits[IDxPanel].TextBoxValuePropToBeCompared.Text);
                        }
                        else
                        {
                            continue;
                        }

                        bool ResComparison = cListProperty.Compare(ObjValue, TmpProp, Comparison);

                        if (ResComparison)
                        {
                            IsHit = true;
                        }
                        else
                        {
                            IsHit = false;
                            TmpWell.SetClass(NonHitClass);
                            break;
                        }

                        IDxPanel++;
                    }

                    if (this.checkBoxTransferToHitList.Checked)
                    {
                        if (IsHit) TmpWell.AddToListWellsGUI();

                    }
                    else
                    {
                        if (IsHit) TmpWell.SetClass(HitClass);
                        else
                        {
                            if(this.checkBoxIsRejectedClass.Checked)
                                TmpWell.SetClass(NonHitClass);
                        }
                    }
                    #endregion
                }
            }
        }