private void UpdateSegmentationLocation() { var x = segXText.Text; var y = segYText.Text; if (string.IsNullOrWhiteSpace(x)) { x = "0"; } if (string.IsNullOrWhiteSpace(y)) { y = "0"; } _segmentation.ChangeLocation(int.Parse(x), int.Parse(y)); pbResultImage.Image = _segmentation.Process(originalImage); }