Esempio n. 1
0
        public void Discretize_Settings_Click(object sender, System.EventArgs args)
        {
            Cursor prev = activeView.Cursor;

            activeView.Cursor = Cursors.WaitCursor;

            form.Refresh();
            activeView.Refresh();

            DiscretizeSettingsDialog dlg = new DiscretizeSettingsDialog(ActiveDocument.DiscretizeSettings, ActiveDocument.OriginalImage);

            activeView.Cursor = prev;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                NuGenDiscretize discretize = new NuGenDiscretize(ActiveDocument.OriginalImage, dlg.DiscretizeSettings);

                discretize.Discretize();
                ActiveDocument.ProcessedImage = discretize.GetImage();

                ActiveDocument.DiscretizeSettings = dlg.DiscretizeSettings;

                ActiveDocument.Segments.MakeSegments(ActiveDocument.ProcessedImage, ActiveDocument.SegmentSettings);

                activeView.DrawAll();
                activeView.Refresh();
            }
        }
Esempio n. 2
0
        public void Discretize_Settings_Click(object sender, System.EventArgs args)
        {
            Cursor prev = activeView.Cursor;
            activeView.Cursor = Cursors.WaitCursor;

            form.Refresh();
            activeView.Refresh();

            DiscretizeSettingsDialog dlg = new DiscretizeSettingsDialog(ActiveDocument.DiscretizeSettings, ActiveDocument.OriginalImage);

            activeView.Cursor = prev;            

            if(dlg.ShowDialog() == DialogResult.OK)
            {
                NuGenDiscretize discretize = new NuGenDiscretize(ActiveDocument.OriginalImage, dlg.DiscretizeSettings);

                discretize.Discretize();
                ActiveDocument.ProcessedImage = discretize.GetImage();

                ActiveDocument.DiscretizeSettings = dlg.DiscretizeSettings;

                ActiveDocument.Segments.MakeSegments(ActiveDocument.ProcessedImage, ActiveDocument.SegmentSettings);

                activeView.DrawAll();
                activeView.Refresh();
            }
        }