ANIMA  4.0
animaSegPerfApp.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <animaSegPerfResults.h>
5 
6 namespace anima
7 {
8 
14 {
15 public:
16  SegPerfApp(void);
17  ~SegPerfApp(void);
18 
19  bool init(int argc, char *argv[]);
20  bool checkParamsCoherence();
21  void checkOutputCoherence();
22  void prepareOutput();
23  void play();
24 
25  static void about();
26 
27 protected:
28  void processAnalyze(SegPerfCAnalyzer &pi_oAnalyzer, int pi_iIndex);
29  void storeMetricsAndMarks(SegPerfResults &pi_roRes);
31 
32 private:
34  // Output way
35  bool m_bTxt;
36  bool m_bXml;
37  bool m_bScreen;
38 
40  // Group of metrics enable
41  bool m_bSegmentationEvaluation;
42  bool m_bAdvancedEvaluation;
43  bool m_bSurfaceEvaluation;
44  bool m_bLesionsDetectionEvaluation;
45 
47  // Lesions specific metrics
48  double m_fSensitivity;
49  double m_fSpecificity;
50  double m_fPPV;
51  double m_fNPV;
52  double m_fDice;
53  double m_fJaccard;
54  double m_fRVE;
55 
57  // Distances metrics
58  double m_fHausdorffDist;
59  double m_fMeanDist;
60  double m_fAverageDist;
61 
63  // Detection scores
64  double m_fPPVL;
65  double m_fSensL;
66  double m_fF1;
67 
69  // general informations
70  int m_iNbThreads; /*<! number of thread used by processing. */
71  std::string m_pchOutBase; /*<! base name used for output file. */
72 
74  // Detection scores parameters
75  double m_fDetectionLesionMinVolume;
76  double m_fTPLMinOverlapRatio;
77  double m_fTPLMaxFalsePositiveRatio;
78  double m_fTPLMaxFalsePositiveRatioModerator;
79 
80  std::string m_oStrInImage; /*<! Path of Image to test. */
81  std::string m_oStrRefImage; /*<! Path of reference Image. */
82  std::string m_oStrBaseOut; /*<! Base name for output results file. */
83 };
84 
85 } // end namespace anima
bool init(int argc, char *argv[])
This method set the application behavior thanks to command line arguments parsing.
static void about()
This method display information about SegPerfAnalyzer results.
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.
long writeStoredMetricsAndMarks(SegPerfResults &pi_roRes)
This method flush SegPerfResults class instance.
void processAnalyze(SegPerfCAnalyzer &pi_oAnalyzer, int pi_iIndex)
This method provides computing metrics, marks and scores for desired label.
void storeMetricsAndMarks(SegPerfResults &pi_roRes)
This method store results into SegPerfResults class instance.
Class to compute various metrics to evaluate segmentation results.
void checkOutputCoherence()
This method define an output way if none are defined by command line.
void prepareOutput()
This method define the base file name for output way.
Class to format and saves results.