18 #ifndef itkCommandIterationUpdatev4_h
19 #define itkCommandIterationUpdatev4_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 (
typeid(event) ==
typeid(itk::IterationEvent))
80 std::cout <<
" : " <<
m_Optimizer->GetCurrentPosition();
82 std::cout << std::endl;
84 else if (
typeid(event) ==
typeid(itk::EndEvent))
86 std::cout << std::endl
88 <<
"After " <<
m_Optimizer->GetCurrentIteration() <<
" iterations " << std::endl;
91 std::cout <<
" Solution is = " <<
m_Optimizer->GetCurrentPosition() << std::endl;
93 std::cout <<
"Solution value = " <<
m_Optimizer->GetValue() << std::endl
94 <<
"Stop condition = " <<
m_Optimizer->GetStopConditionDescription() << std::endl;
124 m_Optimizer->AddObserver(itk::IterationEvent(),
this);
131 itkSetMacro(PrintParameters,
bool);
132 itkGetMacro(PrintParameters,
bool);
133 itkBooleanMacro(PrintParameters);