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";
74 std::cout << std::endl << std::endl;
76 else if (
typeid(event) ==
typeid(itk::IterationEvent))
78 std::cout <<
m_Optimizer->GetCurrentIteration() <<
" = ";
82 std::cout <<
" : " <<
m_Optimizer->GetCurrentPosition();
84 std::cout << std::endl;
86 else if (
typeid(event) ==
typeid(itk::EndEvent))
88 std::cout << std::endl << std::endl;
89 std::cout <<
"After " <<
m_Optimizer->GetCurrentIteration();
90 std::cout <<
" iterations " << std::endl;
93 std::cout <<
" Solution is = " <<
m_Optimizer->GetCurrentPosition();
94 std::cout << std::endl;
96 std::cout <<
"Solution value = " <<
m_Optimizer->GetValue();
97 std::cout << std::endl;
98 std::cout <<
"Stop condition = " <<
m_Optimizer->GetStopConditionDescription();
99 std::cout << std::endl;
129 m_Optimizer->AddObserver(itk::IterationEvent(),
this);
136 itkSetMacro(PrintParameters,
bool);
137 itkGetMacro(PrintParameters,
bool);
138 itkBooleanMacro(PrintParameters);