22 #ifndef otbConfusionMatrixMeasurements_h
23 #define otbConfusionMatrixMeasurements_h
25 #include "itkObject.h"
26 #include "itkObjectFactory.h"
27 #include "itkVariableSizeMatrix.h"
28 #include "itkVariableLengthVector.h"
52 template <
class TConfusionMatrix = itk::VariableSizeMatrix<
unsigned long>,
class TLabel =
int>
89 itkGetMacro(TruePositiveValue,
double);
90 itkGetMacro(TrueNegativeValue,
double);
91 itkGetMacro(FalsePositiveValue,
double);
92 itkGetMacro(FalseNegativeValue,
double);
93 itkGetMacro(KappaIndex,
double);
94 itkGetMacro(OverallAccuracy,
double);
98 itkGetMacro(Precision,
double);
99 itkGetMacro(Recall,
double);
100 itkGetMacro(FScore,
double);
101 itkGetMacro(NumberOfClasses,
unsigned short);
102 itkGetMacro(NumberOfSamples,
unsigned long);
109 m_MapOfClasses = _arg;
110 typename MapOfClassesType::iterator itMapOfClasses;
111 m_MapOfIndices.clear();
112 for (itMapOfClasses = m_MapOfClasses.begin(); itMapOfClasses != m_MapOfClasses.end(); ++itMapOfClasses)
114 m_MapOfIndices[itMapOfClasses->second] = itMapOfClasses->first;
120 return m_MapOfClasses;
129 m_MapOfIndices = _arg;
130 typename MapOfIndicesType::iterator itMapOfIndices;
131 m_MapOfClasses.clear();
132 for (itMapOfIndices = m_MapOfIndices.begin(); itMapOfIndices != m_MapOfIndices.end(); ++itMapOfIndices)
134 m_MapOfClasses[itMapOfIndices->second] = itMapOfIndices->first;
140 return m_MapOfIndices;
153 void operator=(
const Self&) =
delete;
186 #ifndef OTB_MANUAL_INSTANTIATION