ANIMA  4.0
animaSegPerfResults.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 
4 namespace anima
5 {
6 
12 {
13 public:
14  typedef enum
15  {
30  }eMesureName;
31 
32  SegPerfResults(std::string &pi_pchBaseFileName);
34 
35  bool save();
36 
37  bool activeMeasurementOutput(eMesureName pi_eVal);
38 
39  static char const*const*const getMeasureNameTable();
40 
45  void setTxt(bool pi_bEnable = true)
46  {
47  m_bTxt = pi_bEnable;
48  }
49 
54  void setXml(bool pi_bEnable = true)
55  {
56  m_bXml = pi_bEnable;
57  }
58 
63  void setScreen(bool pi_bEnable = true)
64  {
65  m_bScreen = pi_bEnable;
66  }
67 
72  void setJaccard(double pi_fVal)
73  {
74  m_fResTab[eMesureJaccard] = pi_fVal;
75  }
76 
81  void setDice(double pi_fVal)
82  {
83  m_fResTab[eMesureDice] = pi_fVal;
84  }
85 
90  void setSensibility(double pi_fVal)
91  {
92  m_fResTab[eMesureSensibility] = pi_fVal;
93  }
94 
99  void setSpecificity(double pi_fVal)
100  {
101  m_fResTab[eMesureSpecificity] = pi_fVal;
102  }
103 
108  void setPPV(double pi_fVal)
109  {
110  m_fResTab[eMesurePPV] = pi_fVal;
111  }
112 
117  void setNPV(double pi_fVal)
118  {
119  m_fResTab[eMesureNPV] = pi_fVal;
120  }
121 
126  void setRVE(double pi_fVal)
127  {
128  m_fResTab[eMesureRelativeVolumeError] = pi_fVal;
129  }
130 
135  void setHausdorffDist(double pi_fVal)
136  {
137  m_fResTab[eMesureDistHausdorff] = pi_fVal;
138  }
139 
144  void setContourMeanDist(double pi_fVal)
145  {
146  m_fResTab[eMesureDistMean] = pi_fVal;
147  }
148 
153  void setAverageSurfaceDist(double pi_fVal)
154  {
155  m_fResTab[eMesureDistAverage] = pi_fVal;
156  }
157 
162  void setPPVL(double pi_fVal)
163  {
164  m_fResTab[eMesurePPVL] = pi_fVal;
165  }
166 
171  void setSensL(double pi_fVal)
172  {
173  m_fResTab[eMesureSensL] = pi_fVal;
174  }
175 
180  void setF1test(double pi_fVal)
181  {
182  m_fResTab[eMesureF1Test] = pi_fVal;
183  }
184 
185 private:
186  SegPerfResults();
187 
188  double m_fResTab[eMesureLast];
189  bool m_bResActiveTab[eMesureLast];
190  bool m_bTxt;
191  bool m_bXml;
192  bool m_bScreen;
193  std::string m_pchBaseOutputFileName;
195  static char const*const m_ppchMeasureNameTable[eMesureLast];
196 };
197 
198 } // end namespace anima
void setScreen(bool pi_bEnable=true)
Enable or disable on screen results.
void setAverageSurfaceDist(double pi_fVal)
Set the result value of average surface distance measure.
void setSensL(double pi_fVal)
Set the result value of SensL measure.
void setF1test(double pi_fVal)
Set the result value of F1 score of F-test.
bool save()
It saves results on text file or xml file in function of class default settings.
static char const *const *const getMeasureNameTable()
Get the list of all Measures available.
void setDice(double pi_fVal)
Set the result value of Dice measure.
void setRVE(double pi_fVal)
Set the result value of Relative volume error.
void setSensibility(double pi_fVal)
Set the result value of Sensibility measure.
void setXml(bool pi_bEnable=true)
Enable or disable XML file results.
void setJaccard(double pi_fVal)
Set the result value of Jaccard measure.
void setPPVL(double pi_fVal)
Set the result value of PPVL measure.
void setNPV(double pi_fVal)
Set the result value of NPV (Negative Predictive Value) measure.
void setHausdorffDist(double pi_fVal)
Set the result value of DistHausdorff measure.
void setContourMeanDist(double pi_fVal)
Set the result value of contour mean distance measure.
Class to format and saves results.
bool activeMeasurementOutput(eMesureName pi_eVal)
It active the saving of one specific measure. If it set twice time the effect is inverted.
void setSpecificity(double pi_fVal)
Set the result value of Specificity measure.
void setPPV(double pi_fVal)
Set the result value of PPV (Positive Predictive Value) measure.
void setTxt(bool pi_bEnable=true)
Enable or disable text file results.