Commit 826b9824 authored by Guillaume Pasero's avatar Guillaume Pasero

STYLE: applications should use otbAppLog instead of std::cout

parent ac18a14e
......@@ -245,16 +245,6 @@ private:
MapOfClassesType::iterator itMapOfClassesRef, itMapOfClassesProd;
/*for (itMapOfClassesRef = mapOfClassesRefClX.begin(); itMapOfClassesRef != mapOfClassesRefClX.end(); ++itMapOfClassesRef)
{
std::cout << "mapOfClassesRefClX[" << itMapOfClassesRef->first << "] = " << itMapOfClassesRef->second << std::endl;
}
std::cout << std::endl;
for (itMapOfClassesProd = mapOfClassesProdClX.begin(); itMapOfClassesProd != mapOfClassesProdClX.end(); ++itMapOfClassesProd)
{
std::cout << "mapOfClassesProdClX[" << itMapOfClassesProd->first << "] = " << itMapOfClassesProd->second << std::endl;
}*/
// Formatting confusionMatrixClX from confusionMatrixClXTemp in order to make confusionMatrixClX a square matrix
// from the reference labels in mapOfClassesRefClX
int indiceLabelRef = 0, indiceLabelProd = 0;
......@@ -284,9 +274,6 @@ private:
}
++indiceLabelRef;
}
//std::cout << "confusionMatrixClXTemp:" << std::endl << confusionMatrixClXTemp << std::endl << std::endl;
//std::cout << "confusionMatrixClX:" << std::endl << confusionMatrixClX << std::endl;
}
inFile.close();
return EXIT_SUCCESS;
......
......@@ -277,7 +277,6 @@ void LogConfusionMatrix(ConfusionMatrixCalculatorType* confMatCalc)
void DoExecute()
{
GetLogger()->Debug("Entering DoExecute\n");
//Create training and validation for list samples and label list samples
ConcatenateLabelListSampleFilterType::Pointer concatenateTrainingLabels =
ConcatenateLabelListSampleFilterType::New();
......@@ -464,8 +463,8 @@ void DoExecute()
ConfusionMatrixCalculatorType::Pointer confMatCalc = ConfusionMatrixCalculatorType::New();
std::cout << "predicted list size == " << predictedList->Size() << std::endl;
std::cout << "validationLabeledListSample size == " << performanceLabeledListSample->Size() << std::endl;
otbAppLogINFO("Predicted list size : " << predictedList->Size());
otbAppLogINFO("ValidationLabeledListSample size : " << performanceLabeledListSample->Size());
confMatCalc->SetReferenceLabels(performanceLabeledListSample);
confMatCalc->SetProducedLabels(predictedList);
......
......@@ -152,14 +152,14 @@ private:
/*
* Transform Endmembers image to matrix representation
*/
std::cout << "Endmembers extracted" << std::endl;
std::cout << "Converting endmembers to matrix" << std::endl;
otbAppLogINFO("Endmembers extracted");
otbAppLogINFO("Converting endmembers to matrix");
VectorImageToMatrixImageFilterType::Pointer endMember2Matrix = VectorImageToMatrixImageFilterType::New();
endMember2Matrix->SetInput(endmembersImage);
endMember2Matrix->Update();
MatrixType endMembersMatrix = endMember2Matrix->GetMatrix();
std::cout << "Endmembers matrix : " << endMembersMatrix << std::endl;
otbAppLogINFO("Endmembers matrix : " << endMembersMatrix);
/*
* Unmix
......@@ -170,7 +170,7 @@ private:
{
case UnMixingMethod_UCLS:
{
std::cout << "UCLS Unmixing" << std::endl;
otbAppLogINFO("UCLS Unmixing");
UCLSUnmixingFilterType::Pointer unmixer =
UCLSUnmixingFilterType::New();
......@@ -186,7 +186,7 @@ private:
break;
case UnMixingMethod_ISRA:
{
std::cout << "ISRA Unmixing" << std::endl;
otbAppLogINFO("ISRA Unmixing");
ISRAUnmixingFilterType::Pointer unmixer =
ISRAUnmixingFilterType::New();
......@@ -200,7 +200,7 @@ private:
break;
case UnMixingMethod_NCLS:
{
std::cout << "NCLS Unmixing" << std::endl;
otbAppLogINFO("NCLS Unmixing");
NCLSUnmixingFilterType::Pointer unmixer =
NCLSUnmixingFilterType::New();
......@@ -215,7 +215,7 @@ private:
/*
case UnMixingMethod_FCLS:
{
std::cout << "FCLS Unmixing" << std::endl;
otbAppLogINFO("FCLS Unmixing");
FCLSUnmixingFilterType::Pointer unmixer =
FCLSUnmixingFilterType::New();
......@@ -230,7 +230,7 @@ private:
*/
case UnMixingMethod_MDMDNMF:
{
std::cout << "MDMD-NMF Unmixing" << std::endl;
otbAppLogINFO("MDMD-NMF Unmixing");
MDMDNMFUnmixingFilterType::Pointer unmixer =
MDMDNMFUnmixingFilterType::New();
......
......@@ -577,10 +577,7 @@ private:
// Generate
histogramFilter->Update();
const HistogramListType * histogramList = histogramFilter->GetOutput(); //
// HistogramPointerType histoBand=histogramList->GetNelements(0);
// std::cout<<histoBand->GetFrequency(0, 0)<<std::endl;
const HistogramListType * histogramList = histogramFilter->GetOutput();
ImageMetadataInterfaceType::Pointer
metadataInterface = ImageMetadataInterfaceFactory::CreateIMI(supportImage->GetMetaDataDictionary());
......
......@@ -166,7 +166,7 @@ private:
}
else
{
std::cout <<"fast scheme enabled : not implemented for the moment " << std::endl;
otbAppLogWARNING("fast scheme enabled : not implemented for the moment ");
}
// Create an output parameter to write the current output image
......
......@@ -553,7 +553,6 @@ private:
BI2FilterType::Pointer l_BI2Filter = BI2FilterType::New();
std::ostringstream oss;
oss<<"channels."<<m_Map[GetSelectedItems("list")[idx]].chan1;
std::cout << "flag" << std::endl;
l_BI2Filter->GetFunctor().SetNIRIndex(this->GetParameterInt(oss.str()));
oss.str("");
oss<<"channels."<<m_Map[GetSelectedItems("list")[idx]].chan2;
......
......@@ -650,7 +650,6 @@ private:
case 11: // SinclairToMueller
std::cout << "taloula 1" << std::endl;
m_MSRFilter = MSRFilterType::New();
m_MSRFilter->SetInputHH(GetParameterComplexDoubleImage("inhh"));
......
......@@ -470,7 +470,6 @@ private:
rightBandMathExpression << "if(" << rightBandMathCondition.str() << "," << state << "," << elseState << ")";
#endif
std::cout << leftBandMathCondition.str() << std::endl;
if(maskingLeft)
{
GetLogger()->Info("Masking criterion on left image: " + leftBandMathExpression.str() + '\n');
......
......@@ -260,11 +260,11 @@ private:
if(IsParameterEnabled("epi.elevation.avgdem.step"))
{
EnableParameter("epi.elevation.avgdem.mindisp");
std::cout<<m_StatisticsFilter->GetMinimum()<<std::endl;
otbAppLogINFO("Minimum height of averaged DEM : "<<m_StatisticsFilter->GetMinimum());
SetParameterFloat("epi.elevation.avgdem.mindisp",(m_StatisticsFilter->GetMinimum()-m_StatisticsFilter->GetMean())*m_DisplacementFieldSource->GetMeanBaselineRatio());
EnableParameter("epi.elevation.avgdem.maxdisp");
SetParameterFloat("epi.elevation.avgdem.maxdisp",(m_StatisticsFilter->GetMaximum()-m_StatisticsFilter->GetMean())*m_DisplacementFieldSource->GetMeanBaselineRatio());
std::cout<<m_StatisticsFilter->GetMaximum()<<std::endl;
otbAppLogINFO("Maximum height of averaged DEM : "<<m_StatisticsFilter->GetMaximum());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment