private void DiscretizeGo() { NuGenDiscretize discretize = new NuGenDiscretize(originalImage.Clone() as Image, discretizeSettings); NuGenGridRemoval gridRemoval = new NuGenGridRemoval(originalImage, discretize); gridRemoval.RemoveAndConnect(transform, coordSettings, settings, bgColor); Image img = gridRemoval.GetImage(); previewPanel.BackgroundImage = img; previewPanel.BackgroundImageLayout = ImageLayout.Stretch; Refresh(); discretizeThread = null; }
//The main processing method, runs through all of the processing logic public void Process() { NuGenDiscretize discretize = new NuGenDiscretize(originalImage, doc.DiscretizeSettings); NuGenGridRemoval gridRemoval = new NuGenGridRemoval(originalImage, discretize); bgColor = discretize.GetBackgroundColor(); gridRemoval.RemoveAndConnect(doc.Transform, doc.CoordSettings, doc.GridRemovalSettings, bgColor); discretize.Discretize(); processedImage = discretize.GetImage(); NuGenSegmentCollection segments = doc.Segments; segments.MakeSegments(processedImage, doc.SegmentSettings); }