private void OnCoordinateDescentAnnealingProgress(object sender, SimulatedAnnealingProgressEventArgs <Shape> e)
 {
     this.Invoke(new MethodInvoker(
                     delegate
     {
         this.currentImage.Image.Dispose();
         this.currentImage.Image = CreateStatusImage(e.CurrentSolution);
     }));
 }
 private void OnAnnealingBasedSegmentatorProgress(object sender, SimulatedAnnealingProgressEventArgs <Shape> e)
 {
     this.Invoke(new MethodInvoker(
                     delegate
     {
         this.currentImage.Image.Dispose();
         this.currentImage.Image = CreateStatusImage(e.CurrentSolution);
         // TODO: show current mask somehow
     }));
 }