コード例 #1
0
 static void optimizer_Iteration(itkObject sender, itkEventArgs e)
 {
     OptimizerType optimizer = sender as OptimizerType;
     String message = "{0}:   {1}";
     String iteration = optimizer.CurrentIteration.ToString("000");
     String position = optimizer.CurrentPosition.ToString();
     Console.WriteLine(String.Format(message, iteration, position));
 }
コード例 #2
0
 static void LevelSetIteration(itkObject sender, itkEventArgs e)
 {
     LevelSetType levelset = sender as LevelSetType;
     UInt32 i = levelset.ElapsedIterations;
     String str = i.ToString("000 ");
     if (i == 1)       Console.Write(str);
     if (i % 100 == 0) Console.WriteLine();
     if (i %  10 == 0) Console.Write(str);
 }
    void FilterEnded(itkObject sender, itkEventArgs e)
    {
        // Make thread safe
        if (this.InvokeRequired)
        {
            this.Invoke(new itkEventHandler(this.FilterEnded), sender, e);
            return;
        }

        // Show message
        String message = "Ended: {0}";
        this.WriteLine(String.Format(message, DateTime.Now.ToString(TIMEFORMAT)));
    }
コード例 #4
0
 static void filter_Ended(itkObject sender, itkEventArgs e)
 {
     string message = Environment.NewLine + "{0}: Ended at {1}";
     Console.WriteLine(String.Format(message, (sender as itkProcessObject).Name, DateTime.Now));
 }
コード例 #5
0
 static void filter_Started(itkObject sender, itkEventArgs e)
 {
     string message = "{0}: Started at {1}";
     itkProcessObject process = sender as itkProcessObject;
     Console.Write(String.Format(message, process.Name, DateTime.Now));
 }
コード例 #6
0
 static void LevelSetEnded(itkObject sender, itkEventArgs e)
 {
     String message = Environment.NewLine + "Ended: {0}";
     Console.WriteLine(String.Format(message, DateTime.Now));
 }
コード例 #7
0
 static void LevelSetStarted(itkObject sender, itkEventArgs e)
 {
     String message = "Started: {0}";
     Console.WriteLine(String.Format(message, DateTime.Now));
 }