private void OnStartGpuButtonClick(object sender, EventArgs e) { if (this.segmentationProperties.Algorithm == SegmentationAlgorithm.BranchAndBound) { BranchAndBoundSegmentationAlgorithm branchAndBoundSegmentator = new BranchAndBoundSegmentationAlgorithm(); branchAndBoundSegmentator.ShapeTermCalculator = new GpuShapeTermsLowerBoundCalculator(); this.segmentator = branchAndBoundSegmentator; this.RunSegmentation(); } else { MessageBox.Show( "No GPU version available for this kind of algorithm.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void OnStartCpuButtonClick(object sender, EventArgs e) { if (this.segmentationProperties.Algorithm == SegmentationAlgorithm.BranchAndBound) { this.segmentator = new BranchAndBoundSegmentationAlgorithm(); } else if (this.segmentationProperties.Algorithm == SegmentationAlgorithm.CoordinateDescent) { this.segmentator = new CoordinateDescentSegmentationAlgorithm(); } else if (this.segmentationProperties.Algorithm == SegmentationAlgorithm.Annealing) { this.segmentator = new AnnealingSegmentationAlgorithm(); } else { this.segmentator = new SimpleSegmentationAlgorithm(); } this.RunSegmentation(); }