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;
186 #ifndef OTB_MANUAL_INSTANTIATION
unsigned short m_NumberOfClasses
MapOfClassesType GetMapOfClasses() const
MeasurementType m_FalseNegativeValues
double m_FalseNegativeValue
ConfusionMatrixType m_ConfusionMatrix
MeasurementType m_FalsePositiveValues
MeasurementType m_Recalls
~ConfusionMatrixMeasurements() override
itk::VariableLengthVector< double > MeasurementType
MeasurementType m_TrueNegativeValues
TConfusionMatrix ConfusionMatrixType
std::map< ClassLabelType, int > MapOfClassesType
itk::SmartPointer< Self > Pointer
ConfusionMatrixMeasurements(const Self &)=delete
MeasurementType m_FScores
virtual void SetMapOfIndices(const MapOfIndicesType &_arg)
double m_TruePositiveValue
MeasurementType m_Precisions
MeasurementType m_TruePositiveValues
void operator=(const Self &)=delete
ConfusionMatrixMeasurements Self
virtual void SetMapOfClasses(const MapOfClassesType &_arg)
double m_TrueNegativeValue
double m_FalsePositiveValue
MapOfIndicesType GetMapOfIndices() const
itk::SmartPointer< const Self > ConstPointer
std::map< int, ClassLabelType > MapOfIndicesType
MapOfClassesType m_MapOfClasses
MapOfIndicesType m_MapOfIndices
unsigned long m_NumberOfSamples
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.