diff --git a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx index c951104771077100f353287c1eec9e0789064acd..4da55086ea1ef272c2c726ffd78a012296a03efa 100644 --- a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx +++ b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx @@ -376,7 +376,7 @@ private: writeContingencyTable(contingencyTable); } - void DoExecuteConfusionMatrix(const StreamingInitializationData& sid) ITK_OVERRIDE + void DoExecuteConfusionMatrix(const StreamingInitializationData& sid) { // Extraction of the Class Labels from the Reference image/rasterized vector data + filling of m_Matrix diff --git a/Modules/Learning/Unsupervised/include/otbContingencyTable.h b/Modules/Learning/Unsupervised/include/otbContingencyTable.h index fac85011fde5ba500aa5ffc7d64ce4375892e959..f41e33725b3e7b142b526a93dee437a573b8fec9 100644 --- a/Modules/Learning/Unsupervised/include/otbContingencyTable.h +++ b/Modules/Learning/Unsupervised/include/otbContingencyTable.h @@ -24,6 +24,7 @@ #include <vector> #include <iostream> #include <iomanip> +#include <itkVariableSizeMatrix.h> namespace otb { @@ -34,6 +35,8 @@ public: typedef itk::VariableSizeMatrix<unsigned long> MatrixType; typedef std::vector<TClassLabel> LabelList; + MatrixType matrix; + ContingencyTable(LabelList referenceLabels, LabelList producedLabels) : refLabels( referenceLabels ), prodLabels( producedLabels ) { @@ -43,8 +46,6 @@ public: matrix.Fill( 0 ); } - MatrixType matrix; - friend std::ostream &operator<<(std::ostream &o, const ContingencyTable<TClassLabel> &contingencyTable) {