18 #ifndef itkCommandVnlIterationUpdate_h
19 #define itkCommandVnlIterationUpdate_h
32 template <
typename TOptimizer>
71 if (
typeid(event) ==
typeid(itk::StartEvent))
73 std::cout << std::endl <<
"Position Value";
74 std::cout << std::endl << std::endl;
76 else if (itk::IterationEvent().CheckEvent(&event))
78 std::cout <<
m_Optimizer->GetCurrentIteration() <<
" = ";
79 std::cout <<
m_Optimizer->GetCurrentPosition() << std::endl;
81 else if (
typeid(event) ==
typeid(itk::EndEvent))
83 std::cout << std::endl << std::endl;
84 std::cout <<
"After " <<
m_Optimizer->GetCurrentIteration();
85 std::cout <<
" iterations " << std::endl;
86 std::cout <<
"Solution is = " <<
m_Optimizer->GetCurrentPosition();
87 std::cout << std::endl;
88 std::cout <<
"vnl report = " << std::endl;
89 m_Optimizer->GetOptimizer()->diagnose_outcome(std::cout);
119 m_Optimizer->AddObserver(itk::IterationEvent(),
this);