public MosaicForm() { InitializeComponent(); uniformSampler = new UniformImageSampler() { Progress = samplingProgress }; gaussianSampler = new GaussianImageSampler() { Progress = samplingProgress }; hybridGaussianSampler = new HybridGaussianImageSampler() { Progress = samplingProgress, ClusterCount = 10 }; voronoiVisualizer = new VoronoiVisualizer(reconstructionProgress); pointVisualizer = new PointVisualizer(reconstructionProgress); visualizer = voronoiVisualizer; imageSampler = uniformSampler; SetVoronoiVisualizerOptions(); this.samplerTypeComboBox.DataSource = System.Enum.GetValues(typeof(ImageSamplerType)); this.imageVisualizerComboBox.DataSource = System.Enum.GetValues(typeof(VisualizerType)); samplerTypeComboBox.SelectedIndex = 0; imageVisualizerComboBox.SelectedIndex = 0; samplingProgress.ProgressChanged += ReportProgress; reconstructionProgress.ProgressChanged += ReportProgress; }
public void BorderPoints_Plot( [ArgDescription("Points file."), ArgRequired, ArgExistingFile] string pointsFile, [ArgDescription("Horizontal resolution. Leave negative to use the stored viewport."), ArgDefaultValue(-1)] int horizontalResolution, [ArgDescription("Vertical resolution. Leave negateive to use the stored viewport."), ArgDefaultValue(-1)] int verticalResolution) { Size?resolution = null; if (horizontalResolution > 0 && verticalResolution > 0) { resolution = new Size(horizontalResolution, verticalResolution); } PointVisualizer.Render(pointsFile, resolution); }