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" << std::endl << std::endl;
75 else if (itk::IterationEvent().CheckEvent(&event))
77 std::cout <<
m_Optimizer->GetCurrentIteration() <<
" = " <<
m_Optimizer->GetCurrentPosition() << std::endl;
79 else if (
typeid(event) ==
typeid(itk::EndEvent))
81 std::cout << std::endl
83 <<
"After " <<
m_Optimizer->GetCurrentIteration() <<
" iterations " << std::endl
84 <<
"Solution is = " <<
m_Optimizer->GetCurrentPosition() << std::endl
85 <<
"vnl report = " << std::endl;
86 m_Optimizer->GetOptimizer()->diagnose_outcome(std::cout);
116 m_Optimizer->AddObserver(itk::IterationEvent(),
this);