Commit a3cf1313 authored by Antoine Regimbeau's avatar Antoine Regimbeau

BUG: do not mix string and images value

parent 46f85400
......@@ -259,11 +259,11 @@ protected:
otbAppLogINFO("output model : " << GetInternalApplication("training")->GetParameterString("io.out"));
}
void ComputeImageStatistics(const std::string &imageFileName,
void ComputeImageStatistics( ImageBaseType * img,
const std::string &imagesStatsFileName)
{
std::vector<std::string> imageFileNameList = {imageFileName};
GetInternalApplication("imgstats")->SetParameterStringList("il", imageFileNameList);
// std::vector<std::string> imageFileNameList = {imageFileName};
GetInternalApplication("imgstats")->SetParameterImageBase("il", img);
GetInternalApplication("imgstats")->SetParameterString("out", imagesStatsFileName);
ExecuteInternal( "imgstats" );
......@@ -486,7 +486,7 @@ private:
actualNBSamplesForKMeans);
// Compute Images second order statistics
Superclass::ComputeImageStatistics(GetParameterString("in"), fileNames.imgStatOutput);
Superclass::ComputeImageStatistics(GetParameterImageBase("in"), fileNames.imgStatOutput);
// Compute a train model with TrainVectorClassifier app
Superclass::TrainKMModel(GetParameterImage("in"), fileNames.sampleOutput,
......
......@@ -191,13 +191,13 @@ private:
if (IsParameterEnabled("mode.vector.imfield") &&
HasValue("mode.vector.imfield"))
{
GetInternalApplication("vectorization")->SetParameterString("in",
GetParameterString("mode.vector.imfield"));
GetInternalApplication("vectorization")->SetParameterInputImage("in",
GetParameterImage<ImageBaseType>("mode.vector.imfield"));
}
else
{
GetInternalApplication("vectorization")->SetParameterString("in",
GetParameterString("in"));
GetInternalApplication("vectorization")->SetParameterInputImage("in",
GetParameterImage<ImageBaseType>("in"));
}
GetInternalApplication("vectorization")->SetParameterString("inseg",
tmpFilenames[2]);
......
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