Example #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;
            }
        }
Example #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;

            }
        }
Example #3
0
        private void buttonRegion_Click(object sender, EventArgs e)
        {
            SegementationRegion seg = new SegementationRegion(Mesh);

            seg.Run();
            //SegementationGrow.RegionGrow(Mesh);
            GlobalSetting.DisplaySetting.DisplayMode = EnumDisplayMode.SegementationFace;

            ToolPool.Instance.SwitchTool(EnumTool.View);
            OnChanged(EventArgs.Empty);
        }
Example #4
0
        private void buttonRegion_Click(object sender, EventArgs e)
        {
            SegementationRegion seg = new SegementationRegion(Mesh);
            seg.Run();
            //SegementationGrow.RegionGrow(Mesh);
            GlobalSetting.DisplaySetting.DisplayMode = EnumDisplayMode.SegementationFace;

            ToolPool.Instance.SwitchTool(EnumTool.View);
            OnChanged(EventArgs.Empty);
        }