ANIMA  4.0
animaSegPerfAnalyzer.cxx
Go to the documentation of this file.
1 #include <animaSegPerfApp.h>
2 #include <tclap/CmdLine.h>
3 
4 int main(int argc, char **argv)
5 {
6  anima::SegPerfApp oSegPerfApp;
7 
8  bool needWork = false;
9  try
10  {
11  needWork = oSegPerfApp.init(argc, argv);
12  }
13  catch (TCLAP::ArgException &e)
14  {
15  std::cerr << "error: " << e.error() << " for arg " << e.argId() << std::endl;
16  return EXIT_FAILURE;
17  }
18 
19  if (!oSegPerfApp.checkParamsCoherence())
20  return EXIT_FAILURE;
21 
22  if (!needWork)
23  return EXIT_SUCCESS;
24 
25  oSegPerfApp.checkOutputCoherence();
26  oSegPerfApp.prepareOutput();
27 
28  try
29  {
30  oSegPerfApp.play();
31  }
32  catch(std::exception &e)
33  {
34  std::cerr << e.what() << std::endl;
35  return EXIT_FAILURE;
36  }
37 
38  return EXIT_SUCCESS;
39 }
bool init(int argc, char *argv[])
This method set the application behavior thanks to command line arguments parsing.
bool checkParamsCoherence()
This method check if command line arguments are coherent between us.
void play()
This method execute images filter to obtain desired measures, marks and scores.
Main class to structure application and handle command line options.
void checkOutputCoherence()
This method define an output way if none are defined by command line.
int main(int argc, char **argv)
void prepareOutput()
This method define the base file name for output way.