diff --git a/Modules/Applications/AppClassification/include/otbClassKMeansBase.txx b/Modules/Applications/AppClassification/include/otbClassKMeansBase.txx index a065511c39bc95de2876c3bcb36e8e23593b9066..1926a8e4514db8740735721e53cb4fc84030458e 100644 --- a/Modules/Applications/AppClassification/include/otbClassKMeansBase.txx +++ b/Modules/Applications/AppClassification/include/otbClassKMeansBase.txx @@ -271,7 +271,7 @@ void ClassKMeansBase::CreateOutMeansFile(FloatVectorImageType *image, unsigned int nbBands = image->GetNumberOfComponentsPerPixel(); unsigned int nbElements = nbClasses * nbBands; // get the line in model file that contains the centroids positions - std::ifstream infile(modelFileName.c_str()); + std::ifstream infile(modelFileName); if(infile) { // get the end line with the centroids @@ -293,7 +293,7 @@ void ClassKMeansBase::CreateOutMeansFile(FloatVectorImageType *image, // write in the output file std::ofstream outfile; - outfile.open(GetParameterString("outmeans").c_str()); + outfile.open(GetParameterString("outmeans")); for (unsigned int i = 0; i < nbClasses; i++) {