Esempio n. 1
0
        public static void Run(TriMesh mesh, EnumSegemenation type)
        {
            switch (type)
            {
            case EnumSegemenation.AreaGrow:
                SegementationAreaGrow seg = new SegementationAreaGrow(mesh);

                seg.FaceInit();
                for (int i = 0; i < 40; i++)
                {
                    seg.AreaGrowByFace();


                    // OnChanged(EventArgs.Empty);
                }
                break;

            case EnumSegemenation.KMean:
                SegementationKMean kmean = new SegementationKMean(mesh);

                kmean.Init();
                kmean.KMeans();
                break;

            case EnumSegemenation.Region:
                SegementationRegion region = new SegementationRegion(mesh);
                region.Run();
                break;
            }
        }
Esempio n. 2
0
        public static void Run(TriMesh mesh, EnumSegemenation type)
        {
            switch (type)
            {
                case EnumSegemenation.AreaGrow:
                    SegementationAreaGrow seg = new SegementationAreaGrow(mesh);

                    seg.FaceInit();
                    for (int i = 0; i < 40; i++)
                    {
                        seg.AreaGrowByFace();


                       // OnChanged(EventArgs.Empty);
                    }
                    break;
                case EnumSegemenation.KMean:
                    SegementationKMean kmean = new SegementationKMean(mesh);

                    kmean.Init();
                    kmean.KMeans();
                    break;
                case EnumSegemenation.Region:
                    SegementationRegion region = new SegementationRegion(mesh);
                    region.Run();
                    break;

            }
        }