Hey Guys, I am running ITK registration examples V4 (ImageRegistration4.cpp and the other on a roll), and I have a question:
How can I write the outputs in theCommandIterationUpdate class at each iteration step into a txt file?
The outputs are: std::cout << optimizer->GetCurrentIteration() << " "; std::cout << optimizer->GetValue() << " "; std::cout << optimizer->GetCurrentPosition() << std::endl;
I tried creating and opening a file inside int main(), but the class CommandIterationUpdate does not recognize it.
Can you guys give-me a help?
I see. But I still did not get how can I write such values into a .txt file.
I got how class CommandIterationUpdate but I do not know how can I say to that class to write such information at each iteration step.