diff --git a/Examples/Classification/DempsterShaferFusionOfClassificationMapsExample.cxx b/Examples/Classification/DempsterShaferFusionOfClassificationMapsExample.cxx index 1e84a9da7be8093b2847e85c7204cba80a5d3b4d..f6148fdd47492a9dcefeb48600e320e15e0ec926 100644 --- a/Examples/Classification/DempsterShaferFusionOfClassificationMapsExample.cxx +++ b/Examples/Classification/DempsterShaferFusionOfClassificationMapsExample.cxx @@ -71,12 +71,12 @@ int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &mapOfClassesRefClX, ConfusionMatrixType &confusionMatrixClX) { std::ifstream inFile; - inFile.open(fileName.c_str()); + inFile.open(fileName); if (!inFile) { std::cerr << "Confusion Matrix File opening problem with file:" << std::endl; - std::cerr << fileName.c_str() << std::endl; + std::cerr << fileName << std::endl; return EXIT_FAILURE; } else diff --git a/Examples/IO/HDFReaderExample.cxx b/Examples/IO/HDFReaderExample.cxx index c68eb9095f09ed11382079ddf29aad889c3d2697..5c153b7864e7e66d1517cfb3053832d71070166e 100644 --- a/Examples/IO/HDFReaderExample.cxx +++ b/Examples/IO/HDFReaderExample.cxx @@ -115,7 +115,7 @@ int main(int itkNotUsed(argc), char * argv[]) vectorSubdatasetDescriptions.size(); itSubDataset++ ) { std::cout << "Dataset Number " << itSubDataset << " name is: " << vectSubdatasetNames[itSubDataset].c_str() - << " and description is: " << vectSubdatasetNames[itSubDataset].c_str() << std::endl; + << " and description is: " << vectSubdatasetNames[itSubDataset] << std::endl; } } } diff --git a/Modules/Adapters/CurlAdapters/src/otbCurlHelperStub.cxx b/Modules/Adapters/CurlAdapters/src/otbCurlHelperStub.cxx index a9fa28c449697fedadbc8cfcdfb07324e765bf83..ee3185f43d2f85695094ea1ca2e605131e69c816 100644 --- a/Modules/Adapters/CurlAdapters/src/otbCurlHelperStub.cxx +++ b/Modules/Adapters/CurlAdapters/src/otbCurlHelperStub.cxx @@ -63,7 +63,7 @@ int CurlHelperStub::RetrieveFile(const std::ostringstream& urlStream, std::strin if (urlStream.str().compare("http://api.geonames.org/findNearbyPlaceName?lat=1.29&lng=103.78&username=otbteam") == 0) { std::ofstream file; - file.open(filename.c_str()); + file.open(filename); file << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" "<geonames>\n" "<geoname>\n" diff --git a/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx b/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx index 82e071914344a5344a097552fb9b67aeb593bfe5..791733d41d40d2e558831a4b04b3c18d91d4badc 100644 --- a/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx +++ b/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx @@ -165,14 +165,14 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_shp_overwrite) const std::string workingdir = k_name + "/shp"; // Create an empty temporary directory for the test - if ( itksys::SystemTools::FileExists(workingdir.c_str()) ) + if ( itksys::SystemTools::FileExists(workingdir) ) { - itksys::SystemTools::RemoveADirectory(workingdir.c_str()); + itksys::SystemTools::RemoveADirectory(workingdir); } - itksys::SystemTools::MakeDirectory(workingdir.c_str()); + itksys::SystemTools::MakeDirectory(workingdir); std::string filename = workingdir + "/" + k_name + ".shp"; - filename = itksys::SystemTools::ConvertToOutputPath(filename.c_str()); + filename = itksys::SystemTools::ConvertToOutputPath(filename); const std::string layer1 = k_name; @@ -450,14 +450,14 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_sqlite_overwrite) const std::string workingdir = k_name + "/sqlite"; // Create an empty temporary directory for the test - if ( itksys::SystemTools::FileExists(workingdir.c_str()) ) + if ( itksys::SystemTools::FileExists(workingdir) ) { - itksys::SystemTools::RemoveADirectory(workingdir.c_str()); + itksys::SystemTools::RemoveADirectory(workingdir); } - itksys::SystemTools::MakeDirectory(workingdir.c_str()); + itksys::SystemTools::MakeDirectory(workingdir); std::string filename = workingdir + "/" + k_name + ".sqlite"; - filename = itksys::SystemTools::ConvertToOutputPath(filename.c_str()); + filename = itksys::SystemTools::ConvertToOutputPath(filename); const std::string layer1 = boost::algorithm::to_lower_copy(k_name); diff --git a/Modules/Adapters/OSSIMAdapters/test/otbOssimElevManagerTest4.cxx b/Modules/Adapters/OSSIMAdapters/test/otbOssimElevManagerTest4.cxx index 165ede40d06f028570575f826a191093040ec9bd..b356879cbdcf8f460c61308c9580f913dfd601dd 100644 --- a/Modules/Adapters/OSSIMAdapters/test/otbOssimElevManagerTest4.cxx +++ b/Modules/Adapters/OSSIMAdapters/test/otbOssimElevManagerTest4.cxx @@ -105,7 +105,7 @@ int otbOssimElevManagerTest4(int argc, char* argv[]) std::stringstream headerName; headerName << outfname << ".hdr"; std::ofstream headerFile; - headerFile.open(headerName.str().c_str()); + headerFile.open(headerName.str()); headerFile << "ENVI" << std::endl; headerFile << "samples = " << size[0] << std::endl; headerFile << "lines = " << size[1] << std::endl; diff --git a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx index 987fc763382ad3ac3f95fd178bad5bd51c9f9400..7db23f6b3a588c0c9d1f8ae019ee4dabff551fc6 100644 --- a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx +++ b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx @@ -221,7 +221,7 @@ private: void m_WriteContingencyTable(const ContingencyTablePointerType& contingencyTable) { std::ofstream outFile; - outFile.open( this->GetParameterString( "out" ).c_str() ); + outFile.open( this->GetParameterString( "out" ) ); outFile << contingencyTable->ToCSV(); outFile.close(); } @@ -528,7 +528,7 @@ private: std::ofstream outFile; - outFile.open(this->GetParameterString("out").c_str()); + outFile.open(this->GetParameterString("out")); outFile << std::fixed; outFile.precision(10); diff --git a/Modules/Applications/AppClassification/app/otbFusionOfClassifications.cxx b/Modules/Applications/AppClassification/app/otbFusionOfClassifications.cxx index 4fa71c70e5cf371db67b8e70c57088f29d4c5a43..a8dd7f071069a626f0571de89db6b5f334cf3f48 100644 --- a/Modules/Applications/AppClassification/app/otbFusionOfClassifications.cxx +++ b/Modules/Applications/AppClassification/app/otbFusionOfClassifications.cxx @@ -182,12 +182,12 @@ private: int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &mapOfClassesRefClX, ConfusionMatrixType &confusionMatrixClX) { std::ifstream inFile; - inFile.open(fileName.c_str()); + inFile.open(fileName); if (!inFile) { std::cerr << "Confusion Matrix File opening problem with file:" << std::endl; - std::cerr << fileName.c_str() << std::endl; + std::cerr << fileName << std::endl; return EXIT_FAILURE; } else diff --git a/Modules/Applications/AppClassification/app/otbKMeansClassification.cxx b/Modules/Applications/AppClassification/app/otbKMeansClassification.cxx index ee04d9cd0fb2ff3035ca2208a8cd64c735cd93d8..193a93eb09f3325e97d5e7cc7e67adc1a62a24b5 100644 --- a/Modules/Applications/AppClassification/app/otbKMeansClassification.cxx +++ b/Modules/Applications/AppClassification/app/otbKMeansClassification.cxx @@ -356,7 +356,7 @@ protected: bool RemoveFile(const std::string &filePath) { bool res = true; - if( itksys::SystemTools::FileExists( filePath.c_str() ) ) + if( itksys::SystemTools::FileExists( filePath ) ) { size_t posExt = filePath.rfind( '.' ); if( posExt != std::string::npos && filePath.compare( posExt, std::string::npos, ".shp" ) == 0 ) @@ -368,7 +368,7 @@ protected: RemoveFile( dbfPath ); RemoveFile( prjPath ); } - res = itksys::SystemTools::RemoveFile( filePath.c_str() ); + res = itksys::SystemTools::RemoveFile( filePath ); if( !res ) { //otbAppLogINFO( <<"Unable to remove file "<<filePath ); diff --git a/Modules/Applications/AppClassification/app/otbTrainRegression.cxx b/Modules/Applications/AppClassification/app/otbTrainRegression.cxx index 90009e31523c4283eea4b819c9fced52e52d82d7..6b980fad7e7505015df7810e221046571a1a2e65 100644 --- a/Modules/Applications/AppClassification/app/otbTrainRegression.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainRegression.cxx @@ -213,7 +213,7 @@ void DoUpdateParameters() override void ParseCSVPredictors(std::string path, ListSampleType* outputList) { std::ifstream ifs; - ifs.open(path.c_str()); + ifs.open(path); unsigned int nbCols = 0; char sep = '\t'; std::istringstream iss; @@ -235,24 +235,24 @@ void ParseCSVPredictors(std::string path, ListSampleType* outputList) // Avoid commented lines or too short ones if (!line.empty() && line[0] != '#') { - std::vector<itksys::String> words = itksys::SystemTools::SplitString(line.c_str(),sep); + std::vector<itksys::String> words = itksys::SystemTools::SplitString(line,sep); if (nbCols == 0) { // detect separator and feature size if (words.size() < 2) { sep = ' '; - words = itksys::SystemTools::SplitString(line.c_str(),sep); + words = itksys::SystemTools::SplitString(line,sep); } if (words.size() < 2) { sep = ';'; - words = itksys::SystemTools::SplitString(line.c_str(),sep); + words = itksys::SystemTools::SplitString(line,sep); } if (words.size() < 2) { sep = ','; - words = itksys::SystemTools::SplitString(line.c_str(),sep); + words = itksys::SystemTools::SplitString(line,sep); } if (words.size() < 2) { diff --git a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx index 4243c21766ac88d1ca1f915bf1def5018ec5af8b..1f3dc77b0d36e4b0ee7cd87769a71cbf67fe948b 100644 --- a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx @@ -129,7 +129,7 @@ protected: { // Write contingency table std::ofstream outFile; - outFile.open( this->GetParameterString( "io.confmatout" ).c_str() ); + outFile.open( this->GetParameterString( "io.confmatout" ) ); outFile << table->ToCSV(); } } @@ -219,7 +219,7 @@ protected: } std::ofstream outFile; - outFile.open( this->GetParameterString( "io.confmatout" ).c_str() ); + outFile.open( this->GetParameterString( "io.confmatout" ) ); outFile << std::fixed; outFile.precision( 10 ); diff --git a/Modules/Applications/AppClassification/include/otbTrainImagesBase.h b/Modules/Applications/AppClassification/include/otbTrainImagesBase.h index 08e924bc69d5b7974a45335f092440ae5b808c08..6e7ffc57c2f779701ac7f81d34e9c6daeace62f7 100644 --- a/Modules/Applications/AppClassification/include/otbTrainImagesBase.h +++ b/Modules/Applications/AppClassification/include/otbTrainImagesBase.h @@ -273,7 +273,7 @@ protected: bool RemoveFile(std::string &filePath) { bool res = true; - if( itksys::SystemTools::FileExists( filePath.c_str() ) ) + if( itksys::SystemTools::FileExists( filePath ) ) { size_t posExt = filePath.rfind( '.' ); if( posExt != std::string::npos && filePath.compare( posExt, std::string::npos, ".shp" ) == 0 ) @@ -285,7 +285,7 @@ protected: RemoveFile( dbfPath ); RemoveFile( prjPath ); } - res = itksys::SystemTools::RemoveFile( filePath.c_str() ); + res = itksys::SystemTools::RemoveFile( filePath ); if( !res ) { //otbAppLogINFO( <<"Unable to remove file "<<filePath ); diff --git a/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx b/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx index 9921a1eb4921a12fc6cb7e513cf35adaa97dbd27..8a5463e6b8758a93b724148b965c34db79653746 100644 --- a/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx +++ b/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx @@ -348,7 +348,7 @@ private: // Setting up output file std::ofstream file; - file.open(GetParameterString("out").c_str()); + file.open(GetParameterString("out")); file<<std::fixed; file.precision(12); diff --git a/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx b/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx index 2721c1232c42ab7cf208430bb8548dbde859ca74..e14d7753b4165fb5d472e1d206d582c98553e859 100644 --- a/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx +++ b/Modules/Applications/AppDimensionalityReduction/app/otbDimensionalityReduction.cxx @@ -408,7 +408,7 @@ private: { //Write transformation matrix std::ofstream outFile; - outFile.open(this->GetParameterString("outmatrix").c_str()); + outFile.open(this->GetParameterString("outmatrix")); outFile << std::fixed; outFile.precision(10); diff --git a/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx b/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx index 94aba611b85998fd72e0b8714de7bd56fa791f68..aa7dc56e68168f2397d4dd10c38f28992045efbc 100644 --- a/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx +++ b/Modules/Applications/AppImageUtils/app/otbColorMapping.cxx @@ -757,7 +757,7 @@ private: { std::ifstream ifs; - ifs.open(GetParameterString("method.custom.lut").c_str()); + ifs.open(GetParameterString("method.custom.lut")); if (!ifs) { diff --git a/Modules/Applications/AppImageUtils/app/otbDEMConvert.cxx b/Modules/Applications/AppImageUtils/app/otbDEMConvert.cxx index cee406ad9f6f47ec5fbcbecad72067241582bb52..5abad4a0c9e77f0a27df1f4fb4314ea82c7ef996 100644 --- a/Modules/Applications/AppImageUtils/app/otbDEMConvert.cxx +++ b/Modules/Applications/AppImageUtils/app/otbDEMConvert.cxx @@ -157,14 +157,14 @@ void DoExecute() override DEMConverter->Convert(tempFilename, output); // remove the temprorary tif file - if( !itksys::SystemTools::RemoveFile(tempFilename.c_str()) ) + if( !itksys::SystemTools::RemoveFile(tempFilename) ) { itkExceptionMacro("Problem while removing the file " << tempFilename); } // remove the geom file if any - if( itksys::SystemTools::FileExists(tempFilenameGeom.c_str()) - && !itksys::SystemTools::RemoveFile(tempFilenameGeom.c_str())) + if( itksys::SystemTools::FileExists(tempFilenameGeom) + && !itksys::SystemTools::RemoveFile(tempFilenameGeom)) { itkExceptionMacro("Problem while removing the Geom file " << tempFilenameGeom); } diff --git a/Modules/Applications/AppImageUtils/app/otbDownloadSRTMTiles.cxx b/Modules/Applications/AppImageUtils/app/otbDownloadSRTMTiles.cxx index f31c1af73406c3eb217f8bced240d43e97dc2dbc..3092ddde38f238c8d43ab8662fa7911cd2c80c82 100644 --- a/Modules/Applications/AppImageUtils/app/otbDownloadSRTMTiles.cxx +++ b/Modules/Applications/AppImageUtils/app/otbDownloadSRTMTiles.cxx @@ -149,11 +149,11 @@ private: } // try different filenames std::string filepath(path+name+HGTExtension); - bool exists = itksys::SystemTools::FileExists(filepath.c_str()); + bool exists = itksys::SystemTools::FileExists(filepath); if (!exists) { filepath += ZIPExtension; - exists = itksys::SystemTools::FileExists(filepath.c_str()); + exists = itksys::SystemTools::FileExists(filepath); } if (!exists) @@ -161,11 +161,11 @@ private: std::string lowerName(name); std::transform(name.begin(), name.end(), lowerName.begin(), ::tolower); filepath = path + lowerName + HGTExtension; - exists = itksys::SystemTools::FileExists(filepath.c_str()); + exists = itksys::SystemTools::FileExists(filepath); if (!exists) { filepath += ZIPExtension; - exists = itksys::SystemTools::FileExists(filepath.c_str()); + exists = itksys::SystemTools::FileExists(filepath); } } return exists; @@ -179,9 +179,9 @@ private: path += Sep; } path += "foo"; - if( itksys::SystemTools::Touch( path.c_str(), true ) ) + if( itksys::SystemTools::Touch( path, true ) ) { - itksys::SystemTools::RemoveFile( path.c_str() ); + itksys::SystemTools::RemoveFile( path ); } else { diff --git a/Modules/Applications/AppMathParserX/app/otbBandMathX.cxx b/Modules/Applications/AppMathParserX/app/otbBandMathX.cxx index 54be6d8f6345a738ca2574c84bdac83d513513fe..1d87d0c3270ef98fb50e7fc2a066342615fa62ab 100644 --- a/Modules/Applications/AppMathParserX/app/otbBandMathX.cxx +++ b/Modules/Applications/AppMathParserX/app/otbBandMathX.cxx @@ -267,7 +267,7 @@ private: { std::string contextPath = GetParameterString("incontext"); // check that file exists - if (itksys::SystemTools::FileExists(contextPath.c_str(),true)) + if (itksys::SystemTools::FileExists(contextPath,true)) { BandMathImageFilterType::Pointer dummyFilter = BandMathImageFilterType::New(); diff --git a/Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx b/Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx index 311936b341f7fffce1270c5e377bb18a2f09707f..83bc42529266966c872d062d540d1c0f287f1679 100644 --- a/Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx +++ b/Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx @@ -610,7 +610,7 @@ private: // Try to retrieve information from file provided by user std::string filename(GetParameterString("acqui.gainbias")); - std::ifstream file(filename.c_str(), std::ios::in); + std::ifstream file(filename, std::ios::in); if(file) { std::string line; @@ -682,7 +682,7 @@ private: // Try to retrieve information from file provided by user std::string filename(GetParameterString("acqui.solarilluminations")); - std::ifstream file(filename.c_str(), std::ios::in); + std::ifstream file(filename, std::ios::in); if(file) { std::string line; diff --git a/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx b/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx index efc2709cdf05410f09263b51da148c6b9ff5bdf2..d6d105d3bcd4c63ef4da93e0c343d1c0f9c24e62 100644 --- a/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx +++ b/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx @@ -122,7 +122,7 @@ private: // Parse the input file for ground control points std::ifstream ifs; - ifs.open(GetParameterString("inpoints").c_str()); + ifs.open(GetParameterString("inpoints")); TiePointsType tiepoints; @@ -185,7 +185,7 @@ private: ofs.precision(12); if(IsParameterEnabled("outstat")) { - ofs.open(GetParameterString("outstat").c_str()); + ofs.open(GetParameterString("outstat")); ofs<<"#ref_lon ref_lat elevation predicted_lon predicted_lat elevation x_error(meters) y_error(meters) global_error(meters)"<<std::endl; } diff --git a/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx b/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx index d9d6486169a4f33c8b94660cc47b003995f0ae11..c410fb79c31d2db17e64be9cd2d32b5e4288d37d 100644 --- a/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx +++ b/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx @@ -126,7 +126,7 @@ private: // Parse the input file for ground control points std::ifstream ifs; - ifs.open(GetParameterString("inpoints").c_str()); + ifs.open(GetParameterString("inpoints")); TiePointsType tiepoints; @@ -206,7 +206,7 @@ private: ofs.precision(12); if(IsParameterEnabled("outstat")) { - ofs.open(GetParameterString("outstat").c_str()); + ofs.open(GetParameterString("outstat")); ofs<<"#ref_lon ref_lat elevation predicted_lon predicted_lat predicted_elev x_error_ref(meters) y_error_ref(meters) global_error_ref(meters) x_error(meters) y_error(meters) global_error(meters)"<<std::endl; } diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx index f940b88641ded4f305db70e0006504b479574b41..44056bd97ca2019c42da541be5a801877872a766 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx @@ -102,7 +102,7 @@ private: std::string CreateFileName(unsigned int row, unsigned int column, std::string label) { std::string outfname = GetParameterString("out"); - std::string tilesname = itksys::SystemTools::GetFilenameWithoutExtension(outfname.c_str()); + std::string tilesname = itksys::SystemTools::GetFilenameWithoutExtension(outfname); std::stringstream tileOut; tileOut<<tilesname<<"_"<<row<<"_"<<column<<"_"<<label<<".tif"; @@ -143,19 +143,19 @@ private: if(GetParameterInt("cleanup")) { // Try to remove the geom file if existing - std::string geomfile = tile.substr(0,tile.size() - itksys::SystemTools::GetFilenameExtension(tile.c_str()).size()).append(".geom"); + std::string geomfile = tile.substr(0,tile.size() - itksys::SystemTools::GetFilenameExtension(tile).size()).append(".geom"); - if(itksys::SystemTools::FileExists(geomfile.c_str())) + if(itksys::SystemTools::FileExists(geomfile)) { - bool res = itksys::SystemTools::RemoveFile(geomfile.c_str()); + bool res = itksys::SystemTools::RemoveFile(geomfile); if (!res) { otbAppLogINFO(<<"Unable to remove file "<<geomfile); } } - if(itksys::SystemTools::FileExists(tile.c_str())) + if(itksys::SystemTools::FileExists(tile)) { - bool res = itksys::SystemTools::RemoveFile(tile.c_str()); + bool res = itksys::SystemTools::RemoveFile(tile); if (!res) { otbAppLogINFO(<<"Unable to remove file "<<tile); @@ -171,7 +171,7 @@ private: std::string outfname = GetParameterString("out"); std::stringstream vrtfOut; - vrtfOut<<itksys::SystemTools::GetFilenameWithoutExtension(outfname.c_str())<<".vrt"; + vrtfOut<<itksys::SystemTools::GetFilenameWithoutExtension(outfname)<<".vrt"; std::vector<std::string> joins; if(IsParameterEnabled("tmpdir")) @@ -189,7 +189,7 @@ private: std::string vrtfname = itksys::SystemTools::JoinPath(joins); otbAppLogINFO(<<"Creating temporary vrt file: "<<vrtfname); - std::ofstream ofs(vrtfname.c_str()); + std::ofstream ofs(vrtfname); ofs<<"<VRTDataset rasterXSize=\""<<imageSizeX<<"\" rasterYSize=\""<<imageSizeY<<"\">"<<std::endl; ofs<<"\t<VRTRasterBand dataType=\"UInt32\" band=\"1\">"<<std::endl; @@ -342,12 +342,12 @@ private: // Ensure that temporary directory exists if activated: if(IsParameterEnabled("tmpdir")) { - if(!itksys::SystemTools::FileExists(GetParameterString("tmpdir").c_str())) + if(!itksys::SystemTools::FileExists(GetParameterString("tmpdir"))) { m_TmpDirCleanup = true; } otbAppLogINFO(<<"Temporary directory "<<GetParameterString("tmpdir")<<" will be used"); - itksys::SystemTools::MakeDirectory(GetParameterString("tmpdir").c_str()); + itksys::SystemTools::MakeDirectory(GetParameterString("tmpdir")); } //Three steps : @@ -740,7 +740,7 @@ private: if(IsParameterEnabled("tmpdir") && m_TmpDirCleanup) { otbAppLogINFO(<<"Removing tmp directory "<<GetParameterString("tmpdir")<<", since it has been created by the application"); - itksys::SystemTools::RemoveADirectory(GetParameterString("tmpdir").c_str()); + itksys::SystemTools::RemoveADirectory(GetParameterString("tmpdir")); } } diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx index ec8548865ea4759a63189df97edd840376ac4b7d..34daa10b318d8186d203dd618b0a548753e6066d 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx @@ -184,8 +184,8 @@ private: std::vector<std::string> options; ogrDS = otb::ogr::DataSource::New(shapefile, otb::ogr::DataSource::Modes::Overwrite); - std::string layername = itksys::SystemTools::GetFilenameName(shapefile.c_str()); - std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile.c_str()); + std::string layername = itksys::SystemTools::GetFilenameName(shapefile); + std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile); layername = layername.substr(0,layername.size()-(extension.size())); layer = ogrDS->CreateLayer(layername, &oSRS, wkbMultiPolygon, options); diff --git a/Modules/Applications/AppSegmentation/app/otbLargeScaleMeanShift.cxx b/Modules/Applications/AppSegmentation/app/otbLargeScaleMeanShift.cxx index 4422d5096f61414a4ecf9f9f7897453d9a41767d..176ae2fe07778c5b3a75d2c2c5da1cc3961d3c49 100644 --- a/Modules/Applications/AppSegmentation/app/otbLargeScaleMeanShift.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLargeScaleMeanShift.cxx @@ -216,9 +216,9 @@ private: otbAppLogINFO( <<"Final clean-up ..." ); for (unsigned int i=0 ; i<tmpFilenames.size() ; ++i) { - if(itksys::SystemTools::FileExists(tmpFilenames[i].c_str())) + if(itksys::SystemTools::FileExists(tmpFilenames[i])) { - itksys::SystemTools::RemoveFile(tmpFilenames[i].c_str()); + itksys::SystemTools::RemoveFile(tmpFilenames[i]); } } } diff --git a/Modules/Applications/AppStereo/app/otbGeneratePlyFile.cxx b/Modules/Applications/AppStereo/app/otbGeneratePlyFile.cxx index 4f1fce4ee29c2307c2c60dc6a6a01acaeb328d80..d1fbc1895f247ec6072081e58e00ac59930651db 100644 --- a/Modules/Applications/AppStereo/app/otbGeneratePlyFile.cxx +++ b/Modules/Applications/AppStereo/app/otbGeneratePlyFile.cxx @@ -255,7 +255,7 @@ private: interpolator->SetInputImage(colorPtr); // Start writing ply file - std::ofstream ofs(outfname.c_str()); + std::ofstream ofs(outfname); std::ostringstream oss; oss<<std::fixed; oss.precision(12); diff --git a/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx b/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx index 81458a74e3b34122cbdcc8e1d7f86b89212b4e79..520e3ac87c75aaeb8a8e23ce17774574c73d3126 100644 --- a/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx +++ b/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx @@ -74,7 +74,7 @@ std::string CommandLineArgumentParseResult std::ostringstream msg; msg << "GetParameterString(): The following '" << option << "' option is unknown !!"; CommandLineArgumentParserArgumentErrorException e(__FILE__, __LINE__); - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; } OptionMapType::const_iterator it = m_OptionMap.begin(); diff --git a/Modules/Core/Common/include/otbUnaryFunctorWithIndexWithOutputSizeImageFilter.hxx b/Modules/Core/Common/include/otbUnaryFunctorWithIndexWithOutputSizeImageFilter.hxx index ac16a26213b485ce20331b73efefd9b6863d7715..de6cc3d6420604089708ddc7cd027fa176aa3bb3 100644 --- a/Modules/Core/Common/include/otbUnaryFunctorWithIndexWithOutputSizeImageFilter.hxx +++ b/Modules/Core/Common/include/otbUnaryFunctorWithIndexWithOutputSizeImageFilter.hxx @@ -77,7 +77,7 @@ UnaryFunctorWithIndexWithOutputSizeImageFilter<TInputImage, TOutputImage, TFunct std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Core/Common/test/otbImageRegionAdaptativeSplitter.cxx b/Modules/Core/Common/test/otbImageRegionAdaptativeSplitter.cxx index 4cbb881ffe66d7a62007cd1525e5829a3651ffff..960b90db8a5964e30495b28584b3efe1fd71499c 100644 --- a/Modules/Core/Common/test/otbImageRegionAdaptativeSplitter.cxx +++ b/Modules/Core/Common/test/otbImageRegionAdaptativeSplitter.cxx @@ -52,7 +52,7 @@ int otbImageRegionAdaptativeSplitter(int itkNotUsed(argc), char * argv[]) requestedNbSplits = atoi(argv[7]); std::string outfname = argv[8]; - std::ofstream outfile(outfname.c_str()); + std::ofstream outfile(outfname); region.SetSize(regionSize); region.SetIndex(regionIndex); diff --git a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx index cc742a9f6d291c6c841cd41a78cfb129bd12a627..46053d3e125ff48d7fa56680e7fe860d195d08bc 100644 --- a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx +++ b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx @@ -393,7 +393,7 @@ ImageMetadataInterfaceBase::GetBandName() const if (imageKeywordlist.HasKey("support_data.band_name_list")) { std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.band_name_list"); - itksys::SystemTools::Split(valueString.c_str(), outputValues, ' '); + itksys::SystemTools::Split(valueString, outputValues, ' '); } else return outputValues; @@ -401,7 +401,7 @@ ImageMetadataInterfaceBase::GetBandName() const else { std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.band_name"); - itksys::SystemTools::Split(valueString.c_str(), outputValues, '/'); + itksys::SystemTools::Split(valueString, outputValues, '/'); } return outputValues; diff --git a/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.hxx b/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.hxx index f7d1865194cef0ca68644d4ddaa8dc69bbca34ca..8dc8e178479601c06a9dcf0e9c935dae4794e91a 100644 --- a/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.hxx +++ b/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.hxx @@ -114,7 +114,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.hxx b/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.hxx index 15053b5a0d4bd442575bf7f6794881bc6944adf2..68a9f6235aa63a54b0fcc5fbe451546f52cf1b1b 100644 --- a/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.hxx +++ b/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.hxx @@ -137,7 +137,7 @@ void PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::Generate std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Feature/Edge/include/otbTouziEdgeDetectorImageFilter.hxx b/Modules/Feature/Edge/include/otbTouziEdgeDetectorImageFilter.hxx index d6bda2c7e485a78fd6ed7ea03565578d784b13b7..dbb495f7a2dbdc9c1e53d2e87e93fb2f2925b206 100644 --- a/Modules/Feature/Edge/include/otbTouziEdgeDetectorImageFilter.hxx +++ b/Modules/Feature/Edge/include/otbTouziEdgeDetectorImageFilter.hxx @@ -88,7 +88,7 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Feature/Edge/test/0000094-PolygonsVectorization.cxx b/Modules/Feature/Edge/test/0000094-PolygonsVectorization.cxx index e3faa795f5b7857bc059fc339809c784b2f73725..98b784170ddedf7183639a97a7990bc8deb3da30 100644 --- a/Modules/Feature/Edge/test/0000094-PolygonsVectorization.cxx +++ b/Modules/Feature/Edge/test/0000094-PolygonsVectorization.cxx @@ -150,7 +150,7 @@ int main(int argc, char * argv[]) std::ofstream file; if (parseResult->IsOptionPresent("--outputText")) { - file.open(parseResult->GetParameterString("--outputText").c_str()); + file.open(parseResult->GetParameterString("--outputText")); } double minSize = -1; diff --git a/Modules/Feature/Moments/include/otbRadiometricMomentsImageFilter.hxx b/Modules/Feature/Moments/include/otbRadiometricMomentsImageFilter.hxx index 235726c006b1554ecf3a0f43e549934d51b62edc..cdc5c116c55ecb5efecf8f207dab35a8a891a5b8 100644 --- a/Modules/Feature/Moments/include/otbRadiometricMomentsImageFilter.hxx +++ b/Modules/Feature/Moments/include/otbRadiometricMomentsImageFilter.hxx @@ -85,7 +85,7 @@ RadiometricMomentsImageFilter<TInputImage, TOutputImage> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.hxx b/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.hxx index eb0dd44ce3f5b25b18271a70c7c647e9130b18cc..0d90282e794275da343ad521ac6d72c19d2b5cfa 100644 --- a/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.hxx +++ b/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.hxx @@ -320,7 +320,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.hxx b/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.hxx index de66fde4e0c1656fc31c71d8c56021c79897af59..cc24eb4d4f6cf77d7253a8acdb631b4ef67e3be5 100644 --- a/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.hxx +++ b/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.hxx @@ -142,7 +142,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(inputPtr1); throw e; @@ -164,7 +164,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(inputPtr2); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.hxx index a378f335664c796207009c551f71f237fda7f3d3..c04e5a3bbfd32a0f29b1f7c893398c99c2ec9076 100644 --- a/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.hxx @@ -140,7 +140,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(inputPtr1); throw e; @@ -162,7 +162,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(inputPtr2); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbBinaryImageToDensityImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbBinaryImageToDensityImageFilter.hxx index fce404674ae70b9e8aabe4b8ac0d88a9a3e69448..67d6e8102f32a70221da432565f2e5dffa6b1567 100644 --- a/Modules/Filtering/ImageManipulation/include/otbBinaryImageToDensityImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbBinaryImageToDensityImageFilter.hxx @@ -88,7 +88,7 @@ BinaryImageToDensityImageFilter<TInputImage, TOutputImage, TCountFunction> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbFunctionWithNeighborhoodToImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbFunctionWithNeighborhoodToImageFilter.hxx index 9b2d2829d689954557a25b87c7f6f32cd765f096..b55d6dd67d3c0ec5d7e38791db5c08aa2c53f6cb 100644 --- a/Modules/Filtering/ImageManipulation/include/otbFunctionWithNeighborhoodToImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbFunctionWithNeighborhoodToImageFilter.hxx @@ -111,7 +111,7 @@ FunctionWithNeighborhoodToImageFilter<TInputImage, TOutputImage, TFunction> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodImageFilter.hxx index 0f5ab33e28407f8c9d3703ea30a8ba21c1c4a715..be54381c20d0d2dfd6f93cd20e6020f7c878778f 100644 --- a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodImageFilter.hxx @@ -84,7 +84,7 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, TFunction> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.hxx index 2f32ad5be9bc287406ee617f44c172074f5c0142..4c938245615d43d52bc4181df2482a08357a0bf0 100644 --- a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.hxx @@ -103,7 +103,7 @@ UnaryFunctorNeighborhoodWithOffsetImageFilter<TInputImage, TOutputImage, TFuncti std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorWithIndexImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorWithIndexImageFilter.hxx index 6dbe19ef5b026a262a9379f902203e16641bab04..d716aa414dba209d4947666a188a17b41229865a 100644 --- a/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorWithIndexImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbUnaryFunctorWithIndexImageFilter.hxx @@ -77,7 +77,7 @@ UnaryFunctorWithIndexImageFilter<TInputImage, TOutputImage, TFunction> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageNoise/include/otbFrostImageFilter.hxx b/Modules/Filtering/ImageNoise/include/otbFrostImageFilter.hxx index 365034e57d4489238c2dd8d979474b36951362c6..9dbf32af8d5eb7bd57700c69a91ef9d7675cde20 100644 --- a/Modules/Filtering/ImageNoise/include/otbFrostImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/otbFrostImageFilter.hxx @@ -87,7 +87,7 @@ void FrostImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion() std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageNoise/include/otbGammaMAPImageFilter.hxx b/Modules/Filtering/ImageNoise/include/otbGammaMAPImageFilter.hxx index 2f62cdecaeb9bc52ed8941c071d00e6bb2427b74..65b75fb01eb87dce61ecf0b6d8d34272564757e4 100644 --- a/Modules/Filtering/ImageNoise/include/otbGammaMAPImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/otbGammaMAPImageFilter.hxx @@ -86,7 +86,7 @@ void GammaMAPImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegio std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageNoise/include/otbKuanImageFilter.hxx b/Modules/Filtering/ImageNoise/include/otbKuanImageFilter.hxx index 287c327d8cd97766492d65aff09c59081f83e9a4..56a5e1cd5e756678ade72749f98318e2e705c38b 100644 --- a/Modules/Filtering/ImageNoise/include/otbKuanImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/otbKuanImageFilter.hxx @@ -86,7 +86,7 @@ void KuanImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion() std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/ImageNoise/include/otbLeeImageFilter.hxx b/Modules/Filtering/ImageNoise/include/otbLeeImageFilter.hxx index 6e4ac42566f02100367c3136650c7ee3f0c2eb19..d2f693fa8e9fcbb624fe2a422a6b20078051012f 100644 --- a/Modules/Filtering/ImageNoise/include/otbLeeImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/otbLeeImageFilter.hxx @@ -86,7 +86,7 @@ void LeeImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion() t std::ostringstream msg; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDataObject(inputPtr); throw e; diff --git a/Modules/Filtering/MathParserX/include/otbBandMathXImageFilter.hxx b/Modules/Filtering/MathParserX/include/otbBandMathXImageFilter.hxx index 7ffd792316a5045bef14b88b44354d8a42600c9f..9297c9000ea5bf6527c0234480c1c95e44076fb9 100644 --- a/Modules/Filtering/MathParserX/include/otbBandMathXImageFilter.hxx +++ b/Modules/Filtering/MathParserX/include/otbBandMathXImageFilter.hxx @@ -400,7 +400,7 @@ void BandMathXImageFilter<TImage> vectFinal.push_back(str); } - std::ofstream exportFile(filename.c_str(), std::ios::out | std::ios::trunc); + std::ofstream exportFile(filename, std::ios::out | std::ios::trunc); if(exportFile) { for(unsigned int i=0; i<vectFinal.size(); ++i) @@ -416,7 +416,7 @@ template< typename TImage > void BandMathXImageFilter<TImage> ::ImportContext(const std::string& filename) { - std::ifstream importFile(filename.c_str(), std::ios::in); + std::ifstream importFile(filename, std::ios::in); std::string wholeline,line,name,matrixdef; int pos,pos2,lineID=0,nbSuccesses=0; @@ -978,9 +978,9 @@ void BandMathXImageFilter< TImage > std::ostringstream msg,msg2; msg << static_cast<const char *>(this->GetNameOfClass()) << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); msg2 << "Requested region is (at least partially) outside the largest possible region (input #" << m_NeighDetected[i] << ")."; - e.SetDescription(msg2.str().c_str()); + e.SetDescription(msg2.str()); e.SetDataObject(inputPtr); throw e; } diff --git a/Modules/Filtering/Statistics/test/otbListSampleGeneratorTest.cxx b/Modules/Filtering/Statistics/test/otbListSampleGeneratorTest.cxx index 9aa8097bfb5b871aeaacefd2d525d387d4481e08..7f7cb135a30712f1f6d75d3a475fe80b7bdcc35f 100644 --- a/Modules/Filtering/Statistics/test/otbListSampleGeneratorTest.cxx +++ b/Modules/Filtering/Statistics/test/otbListSampleGeneratorTest.cxx @@ -102,7 +102,7 @@ int otbListSampleGenerator(int argc, char* argv[]) typedef ListSampleGeneratorType::ListLabelType::ConstIterator LabelIterator; std::ofstream trainingFile; - trainingFile.open(outputSampleList.c_str()); + trainingFile.open(outputSampleList); SampleIterator sampleIt = samples->Begin(); LabelIterator labelIt = labels->Begin(); @@ -131,7 +131,7 @@ int otbListSampleGenerator(int argc, char* argv[]) typedef ListSampleGeneratorType::ListLabelType::ConstIterator LabelIterator; std::ofstream validationFile; - validationFile.open(outputSampleListValidation.c_str()); + validationFile.open(outputSampleListValidation); SampleIterator sampleIt = samples->Begin(); LabelIterator labelIt = labels->Begin(); diff --git a/Modules/IO/Carto/include/otbMapFileProductWriter.hxx b/Modules/IO/Carto/include/otbMapFileProductWriter.hxx index 46ef1ad17c0c6ddaa45499b2e99408e3cfd84343..87e71e7f0aaead67b1653b86433ab093286dac84 100644 --- a/Modules/IO/Carto/include/otbMapFileProductWriter.hxx +++ b/Modules/IO/Carto/include/otbMapFileProductWriter.hxx @@ -297,7 +297,7 @@ MapFileProductWriter<TInputImage> std::ostringstream path; path << m_ShapeIndexPath<<"/tiles"; - if (!itksys::SystemTools::MakeDirectory(path.str().c_str())) + if (!itksys::SystemTools::MakeDirectory(path.str())) { itkExceptionMacro(<< "Error while creating cache directory" << path.str()); } @@ -497,13 +497,13 @@ MapFileProductWriter<TInputImage> std::ostringstream path; path << itksys::SystemTools::GetFilenamePath(m_FileName); - if (!itksys::SystemTools::MakeDirectory(path.str().c_str())) + if (!itksys::SystemTools::MakeDirectory(path.str())) { itkExceptionMacro(<< "Error while creating cache directory" << path.str()); } // Create a mapfile - m_File.open(m_FileName.c_str()); + m_File.open(m_FileName); m_File << std::fixed << std::setprecision(6); // Get the name of the layer diff --git a/Modules/IO/Carto/src/otbWorldFile.cxx b/Modules/IO/Carto/src/otbWorldFile.cxx index 2c63e2402cb50da855fab4da32a9d56f6163c1b6..adeb5788632c9cab9d5301ad0ae29af86e8ba8c1 100644 --- a/Modules/IO/Carto/src/otbWorldFile.cxx +++ b/Modules/IO/Carto/src/otbWorldFile.cxx @@ -34,7 +34,7 @@ void WorldFile::Update() int i = m_ImageFilename.find_last_of('.'); worldFilename = m_ImageFilename.substr(0, i) + ".wld"; - std::ofstream file(worldFilename.c_str()); + std::ofstream file(worldFilename); if(!file) itkExceptionMacro(<<"Can not open file "<<worldFilename<<" for output"); diff --git a/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx b/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx index 54d6cc29ff795b2da1ea9aeb8317f684aa757570..96d183123187b2635cf900fd1dd5c727fda9d165 100644 --- a/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx +++ b/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx @@ -96,7 +96,7 @@ bool BSQImageIO::CanReadFile(const char* filename) { return false; } - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -105,7 +105,7 @@ bool BSQImageIO::CanReadFile(const char* filename) return false; } - header_file.open(lFileName.c_str(), std::ios::in); + header_file.open(lFileName, std::ios::in); if (header_file.fail()) { otbMsgDevMacro(<< "BSQImageIO::CanReadFile() failed header open ! "); @@ -228,7 +228,7 @@ void BSQImageIO::ReadImageInformation() { m_HeaderFile.close(); } - m_HeaderFile.open(m_FileName.c_str(), std::ios::in); + m_HeaderFile.open(m_FileName, std::ios::in); if (m_HeaderFile.fail()) { itkExceptionMacro(<< "BSQImageIO::ReadImageInformation() failed header open ! "); @@ -449,7 +449,7 @@ bool BSQImageIO::InternalReadHeaderInformation(const std::string& file_name, std //Try to open channels file for (unsigned int channels = 0; channels < m_ChannelsFileName.size(); ++channels) { - m_ChannelsFile[channels].open(m_ChannelsFileName[channels].c_str(), std::ios::in | std::ios::binary); + m_ChannelsFile[channels].open(m_ChannelsFileName[channels], std::ios::in | std::ios::binary); if (m_ChannelsFile[channels].fail()) { if (reportError == true) @@ -476,7 +476,7 @@ bool BSQImageIO::CanWriteFile(const char* filename) { return false; } - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -569,7 +569,7 @@ void BSQImageIO::WriteImageInformation() } if (CanWriteFile(m_FileName.c_str()) == false) { - itkExceptionMacro(<< "The file " << m_FileName.c_str() << " is not defined as a BSQ file"); + itkExceptionMacro(<< "The file " << m_FileName << " is not defined as a BSQ file"); } // Close file from any previous image if (m_HeaderFile.is_open()) @@ -579,10 +579,10 @@ void BSQImageIO::WriteImageInformation() // Open the new file for writing // Actually open the file - m_HeaderFile.open(m_FileName.c_str(), std::ios::out | std::ios::trunc); + m_HeaderFile.open(m_FileName, std::ios::out | std::ios::trunc); if (m_HeaderFile.fail()) { - itkExceptionMacro(<< "Cannot write requested file " << m_FileName.c_str() << "."); + itkExceptionMacro(<< "Cannot write requested file " << m_FileName << "."); } if (0) {} diff --git a/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx b/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx index d29052b23549566bacab228af3efd9bb2efafde3..3819ae10eb94f9070f17222766aceb67b07dbca5 100644 --- a/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx @@ -79,7 +79,7 @@ GDALDriverManagerWrapper::Open( std::string filename ) const if (strcmp(identifyDriver->GetDescription(),"JPEG2000") == 0) { itkGenericExceptionMacro(<< "Error : tried to open the file " - << filename.c_str() << " with GDAL driver Jasper " + << filename << " with GDAL driver Jasper " "(which fails on OTB). Try setting the environment variable GDAL_SKIP" " in order to avoid this driver."); } diff --git a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx index ff4a42561d5c1b2da44c7f770643f48cacf33cba..70e3082493088b8f3cc62cb73c6189292273846b 100644 --- a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx @@ -212,7 +212,7 @@ void GDALImageIO::Read(void* buffer) if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while reading image (GDAL format) '" - << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg()); + << m_FileName << "' : " << CPLGetLastErrorMsg()); } otbLogMacro(Debug,<< "GDAL read took " << chrono.GetElapsedMilliseconds() << " ms") @@ -271,7 +271,7 @@ void GDALImageIO::Read(void* buffer) if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while reading image (GDAL format) '" - << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg()); + << m_FileName << "' : " << CPLGetLastErrorMsg()); return; } @@ -1199,7 +1199,7 @@ void GDALImageIO::Write(const void* buffer) if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while writing image (GDAL format) '" - << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg()); + << m_FileName << "' : " << CPLGetLastErrorMsg()); } otbLogMacro(Debug,<< "GDAL write took " << chrono.GetElapsedMilliseconds() << " ms") @@ -1227,7 +1227,7 @@ void GDALImageIO::Write(const void* buffer) if(!hOutputDS) { itkExceptionMacro(<< "Error while writing image (GDAL format) '" - << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg()); + << m_FileName << "' : " << CPLGetLastErrorMsg()); } else { @@ -1364,7 +1364,7 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) if (driverShortName == "NOT-FOUND") { itkExceptionMacro( - << "GDAL Writing failed: the image file name '" << m_FileName.c_str() << "' is not recognized by GDAL."); + << "GDAL Writing failed: the image file name '" << m_FileName << "' is not recognized by GDAL."); } if (m_CanStreamWrite) diff --git a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx index b88b582f280b355b688577fe6e4d72e9a0c8d01a..a0c86f7d70a99124182c1ac363fcc8bf4dbc7d2f 100644 --- a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx @@ -485,7 +485,7 @@ GDALOverviewsBuilder // GDALDriverManagerWrapper::GetInstance().Open(m_InputFileName); // if (wrappedDataset.IsNull()) // { - // itkExceptionMacro(<< "Error while opening the file "<< m_InputFileName.c_str() << "."); + // itkExceptionMacro(<< "Error while opening the file "<< m_InputFileName << "."); // } @@ -562,7 +562,7 @@ GDALOverviewsBuilder if (lCrGdal == CE_Failure) { - itkExceptionMacro(<< "Error while building the GDAL overviews from " << m_InputFileName.c_str() << "."); + itkExceptionMacro(<< "Error while building the GDAL overviews from " << m_InputFileName << "."); } } diff --git a/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx b/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx index 348c1e1b51e901cd86a3b112c72c02b76d909d85..f47b192d7ea916632d00f880722f7d7304f1a1b4 100644 --- a/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx +++ b/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx @@ -193,7 +193,7 @@ bool OGRVectorDataIO::CanWriteFile(const char* filename) const { std::string lFileName(filename); - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } diff --git a/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx b/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx index 4cf71e19fc22b68f307835b8f35c988e75405f06..c0bc2bcd3dfeb25e312302378a33496328c7c4f0 100644 --- a/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx +++ b/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx @@ -144,7 +144,7 @@ int otbGDALImageIOTestWriteMetadata(int itkNotUsed(argc), char * argv[]) // Open file where save test result std::ofstream file; - file.open(filenameReport.c_str()); + file.open(filenameReport); // None testWriteMetadata(filenameTIFF, filenameHDR, options, file); diff --git a/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx b/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx index 32b5c7e5ad007680e91bb7d62dd30a6a3d3adf6f..a2781a04c28e38c1c5de72c26c2cf1082aeaf3e9 100644 --- a/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx +++ b/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx @@ -59,7 +59,7 @@ bool KMLVectorDataIO::CanReadFile(const char* filename) const { std::string lFileName(filename); - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -511,7 +511,7 @@ KMLVectorDataIO bool KMLVectorDataIO::CanWriteFile(const char* filename) const { std::string lFileName(filename); - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -591,7 +591,7 @@ void KMLVectorDataIO::Write(const itk::DataObject* datag, char ** itkNotUsed(pap kml_file->SerializeToString(&output); std::ofstream fout; - fout.open(this->m_FileName.c_str()); + fout.open(this->m_FileName); fout << output; fout.close(); diff --git a/Modules/IO/IOLUM/src/otbLUMImageIO.cxx b/Modules/IO/IOLUM/src/otbLUMImageIO.cxx index 2b90ae26c36d81dac04d506f1bec55ee67a8cf41..fd08a1896641f7f1ff46df6e6936edaa98ed8794 100644 --- a/Modules/IO/IOLUM/src/otbLUMImageIO.cxx +++ b/Modules/IO/IOLUM/src/otbLUMImageIO.cxx @@ -92,7 +92,7 @@ bool LUMImageIO::CanReadFile(const char* filename) { return false; } - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -192,7 +192,7 @@ void LUMImageIO::ReadImageInformation() m_File.close(); } - m_File.open(m_FileName.c_str(), std::ios::in | std::ios::binary); + m_File.open(m_FileName, std::ios::in | std::ios::binary); if (m_File.fail()) { itkExceptionMacro(<< "LUMImageIO::ReadImageInformation() failed header open ! "); @@ -320,7 +320,7 @@ bool LUMImageIO::CanWriteFile(const char* filename) { return false; } - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -388,7 +388,7 @@ void LUMImageIO::WriteImageInformation() } if (CanWriteFile(m_FileName.c_str()) == false) { - itkExceptionMacro(<< "The file " << m_FileName.c_str() << " is not defined as a LUM file"); + itkExceptionMacro(<< "The file " << m_FileName << " is not defined as a LUM file"); } // Close file from any previous image if (m_File.is_open()) @@ -398,10 +398,10 @@ void LUMImageIO::WriteImageInformation() // Open the new file for writing // Actually open the file - m_File.open(m_FileName.c_str(), std::ios::out | std::ios::trunc | std::ios::binary); + m_File.open(m_FileName, std::ios::out | std::ios::trunc | std::ios::binary); if (m_File.fail()) { - itkExceptionMacro(<< "Cannot write requested file " << m_FileName.c_str() << "."); + itkExceptionMacro(<< "Cannot write requested file " << m_FileName << "."); } //Writing header information diff --git a/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx b/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx index bb4f646929e9390525ba1133ec80ad5c5a6a85b6..f2958030ae6d3cfd61760425365a575753dd2a5a 100644 --- a/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx +++ b/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx @@ -272,7 +272,7 @@ void MSTARImageIO::Read(void* buffer) MSTARfp = fopen(MSTARname, "rb"); if (MSTARfp == nullptr) { - itkExceptionMacro(<< "Error: Unable to open file for reading!\n\n " << m_FileName.c_str() << ")."); + itkExceptionMacro(<< "Error: Unable to open file for reading!\n\n " << m_FileName << ")."); } /**************************************************** diff --git a/Modules/IO/IOONERA/src/otbONERAImageIO.cxx b/Modules/IO/IOONERA/src/otbONERAImageIO.cxx index 4c7979b5f5728f3757885c4680cdc44d22d81642..8d98f911522036f617887abaadba98da2c6d5c61 100644 --- a/Modules/IO/IOONERA/src/otbONERAImageIO.cxx +++ b/Modules/IO/IOONERA/src/otbONERAImageIO.cxx @@ -93,7 +93,7 @@ bool ONERAImageIO::CanReadFile(const char* FileNameToRead) m_Headerfile.close(); } - if (itksys::SystemTools::FileIsDirectory(filename.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(filename) == true) { return false; } @@ -101,13 +101,13 @@ bool ONERAImageIO::CanReadFile(const char* FileNameToRead) const std::string HeaderFileName = System::GetRootName(filename) + ".ent"; const std::string DataFileName = System::GetRootName(filename) + ".dat"; - m_Headerfile.open(HeaderFileName.c_str(), std::ios::in); + m_Headerfile.open(HeaderFileName, std::ios::in); if (m_Headerfile.fail()) { otbMsgDevMacro(<< "ONERAImageIO::CanReadFile() failed header open ! "); return false; } - m_Datafile.open(DataFileName.c_str(), std::ios::in); + m_Datafile.open(DataFileName, std::ios::in); if (m_Datafile.fail()) { otbMsgDevMacro(<< "ONERAImageIO::CanReadFile() failed data open ! "); @@ -255,7 +255,7 @@ bool ONERAImageIO::OpenOneraDataFileForReading(const char* filename) const std::string DataFileName = System::GetRootName(filename) + ".dat"; // Open the new file for reading - m_Datafile.open(DataFileName.c_str(), std::ios::in | std::ios::binary); + m_Datafile.open(DataFileName, std::ios::in | std::ios::binary); if (m_Datafile.fail()) { otbMsgDebugMacro(<< "ONERAImageIO::CanReadFile() failed data open ! "); @@ -283,7 +283,7 @@ bool ONERAImageIO::OpenOneraHeaderFileForReading(const char* filename) // Open the new file for reading // Actually open the file - m_Headerfile.open(HeaderFileName.c_str(), std::ios::in); + m_Headerfile.open(HeaderFileName, std::ios::in); if (m_Headerfile.fail()) { otbMsgDebugMacro(<< "ONERAImageIO::CanReadFile() failed header open ! "); @@ -415,7 +415,7 @@ bool ONERAImageIO::OpenOneraDataFileForWriting(const char* filename) // Open the new file for reading // Actually open the file - m_Datafile.open(DataFileName.c_str(), std::ios::out | std::ios::trunc | std::ios::binary); + m_Datafile.open(DataFileName, std::ios::out | std::ios::trunc | std::ios::binary); if (m_Datafile.fail()) { otbMsgDebugMacro(<< "ONERAImageIO::OpenOneraDataFileForWriting() failed data open ! "); @@ -443,7 +443,7 @@ bool ONERAImageIO::OpenOneraHeaderFileForWriting(const char* filename) // Open the new file for reading // Actually open the file - m_Headerfile.open(HeaderFileName.c_str(), std::ios::out | std::ios::trunc | std::ios::binary); + m_Headerfile.open(HeaderFileName, std::ios::out | std::ios::trunc | std::ios::binary); if (m_Headerfile.fail()) { otbMsgDebugMacro(<< "ONERAImageIO::OpenOneraHeaderFileForWriting() failed header open ! "); @@ -544,7 +544,7 @@ void ONERAImageIO::InternalWriteImageInformation() m_Headerfile << "# [fichier en-tete produit par les routines de otb (Orfeo ToolBox) ]" << std::endl; m_Headerfile << "# Nom du look :" << std::endl; - m_Headerfile << "Look.dat= \t" << DataFileName.c_str() << std::endl; + m_Headerfile << "Look.dat= \t" << DataFileName << std::endl; m_Headerfile << std::endl; m_Headerfile << "# Structure du fichier et codage des pixels :" << std::endl; m_Headerfile << "# 4 octets precedent la premiere ligne : ils correspondent a un nombre magique [I4= 33554433] " << diff --git a/Modules/IO/IORAD/src/otbRADImageIO.cxx b/Modules/IO/IORAD/src/otbRADImageIO.cxx index 0a8ebfc428fd27ef37819b4485cd84449aac2fb6..1e6c45d8a8122afb799f317f8a9be2e911719294 100644 --- a/Modules/IO/IORAD/src/otbRADImageIO.cxx +++ b/Modules/IO/IORAD/src/otbRADImageIO.cxx @@ -99,7 +99,7 @@ bool RADImageIO::CanReadFile(const char* filename) { std::fstream header_file; std::string lFileName(filename); - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -108,7 +108,7 @@ bool RADImageIO::CanReadFile(const char* filename) return false; } - header_file.open(lFileName.c_str(), std::ios::in); + header_file.open(lFileName, std::ios::in); if (header_file.fail()) { otbMsgDevMacro(<< "RADImageIO::CanReadFile() failed header open ! "); @@ -233,7 +233,7 @@ void RADImageIO::ReadImageInformation() { m_HeaderFile.close(); } - m_HeaderFile.open(m_FileName.c_str(), std::ios::in); + m_HeaderFile.open(m_FileName, std::ios::in); if (m_HeaderFile.fail()) { itkExceptionMacro(<< "RADImageIO::ReadImageInformation() failed header open ! "); @@ -471,7 +471,7 @@ bool RADImageIO::InternalReadHeaderInformation(const std::string& file_name, std for (unsigned int channels = 0; channels < m_ChannelsFileName.size(); ++channels) { - m_ChannelsFile[channels].open(m_ChannelsFileName[channels].c_str(), std::ios::in | std::ios::binary); + m_ChannelsFile[channels].open(m_ChannelsFileName[channels], std::ios::in | std::ios::binary); if (m_ChannelsFile[channels].fail()) { if (reportError == true) @@ -497,7 +497,7 @@ bool RADImageIO::CanWriteFile(const char* filename) { return false; } - if (itksys::SystemTools::FileIsDirectory(lFileName.c_str()) == true) + if (itksys::SystemTools::FileIsDirectory(lFileName) == true) { return false; } @@ -584,7 +584,7 @@ void RADImageIO::WriteImageInformation() } if (CanWriteFile(m_FileName.c_str()) == false) { - itkExceptionMacro(<< "The file " << m_FileName.c_str() << " is not defined as a RAD file"); + itkExceptionMacro(<< "The file " << m_FileName << " is not defined as a RAD file"); } // Close file from any previous image @@ -595,10 +595,10 @@ void RADImageIO::WriteImageInformation() // Open the new file for writing // Actually open the file - m_HeaderFile.open(m_FileName.c_str(), std::ios::out | std::ios::trunc); + m_HeaderFile.open(m_FileName, std::ios::out | std::ios::trunc); if (m_HeaderFile.fail()) { - itkExceptionMacro(<< "Cannot write requested file " << m_FileName.c_str() << "."); + itkExceptionMacro(<< "Cannot write requested file " << m_FileName << "."); } //Write COLUMNS information @@ -730,7 +730,7 @@ void RADImageIO::WriteImageInformation() for (unsigned int i = 0; i < m_NbOfChannels; ++i) { - m_HeaderFile << itksys::SystemTools::GetFilenameName(this->m_ChannelsFileName[i].c_str()) << std::endl; + m_HeaderFile << itksys::SystemTools::GetFilenameName(this->m_ChannelsFileName[i]) << std::endl; } m_HeaderFile.close(); diff --git a/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx b/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx index 4ceec69aaed70346ad29d72eefaa7d8261691609..8d51a6876ed81a9af03b6ba65e1cbc0f6a2d0290 100644 --- a/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx +++ b/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx @@ -229,7 +229,7 @@ void TileMapImageIO::GenerateTileInfo(double x, double y, int numTileX, int numT bool TileMapImageIO::CanReadFromCache(const std::string& filename) { // Verify that the file exists and is not a directory - bool fileExists = itksys::SystemTools::FileExists(filename.c_str(), true); + bool fileExists = itksys::SystemTools::FileExists(filename, true); if (!fileExists) { return false; @@ -402,7 +402,7 @@ void TileMapImageIO::BuildFileName(const std::ostringstream& quad, std::ostrings ++i; } - itksys::SystemTools::MakeDirectory(directory.str().c_str()); + itksys::SystemTools::MakeDirectory(directory.str()); filename << directory.str(); filename << "/"; @@ -439,7 +439,7 @@ void TileMapImageIO::ReadImageInformation() if (!m_FileNameIsServerName) { - std::ifstream file(m_FileName.c_str(), std::ifstream::in); + std::ifstream file(m_FileName, std::ifstream::in); std::getline(file, m_ServerName); if (m_ServerName.find("http://") != 0) { @@ -672,7 +672,7 @@ void TileMapImageIO::InternalWrite(double x, double y, const void* buffer) if (lCanWrite) { - itksys::SystemTools::RemoveFile(filename.str().c_str()); + itksys::SystemTools::RemoveFile(filename.str()); imageIO->CanStreamWrite(); imageIO->SetNumberOfDimensions(2); @@ -844,13 +844,13 @@ void TileMapImageIO::SetCacheDirectory(const char* _arg) { std::ostringstream oss; oss<<_arg<<"/foo"; - if( itksys::SystemTools::Touch( oss.str().c_str(), true ) == false ) + if( itksys::SystemTools::Touch( oss.str(), true ) == false ) { itkExceptionMacro( "Error, no write permission in given CacheDirectory "<<_arg<<"."); } else { - itksys::SystemTools::RemoveFile( oss.str().c_str() ); + itksys::SystemTools::RemoveFile( oss.str() ); } } // if existing file diff --git a/Modules/IO/ImageIO/include/otbImageFileReader.hxx b/Modules/IO/ImageIO/include/otbImageFileReader.hxx index d611cc98fe58062309cd1d74991e0a593dc6c21d..b1a752a7df12b6627661ef94c50a61d8f7f06d0e 100644 --- a/Modules/IO/ImageIO/include/otbImageFileReader.hxx +++ b/Modules/IO/ImageIO/include/otbImageFileReader.hxx @@ -586,7 +586,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits> std::string fileToCheck = GetDerivedDatasetSourceFileName(m_FileName); // Test if the file exists. - if (!itksys::SystemTools::FileExists(fileToCheck.c_str())) + if (!itksys::SystemTools::FileExists(fileToCheck)) { throw otb::ImageFileReaderException (__FILE__, __LINE__, "The file does not exist.", fileToCheck); } @@ -889,7 +889,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits> << std::endl << " " << typeid(float).name() << std::endl << " " << typeid(double).name() << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); e.SetLocation(ITK_LOCATION); throw e; return; diff --git a/Modules/IO/ImageIO/include/otbImageFileWriter.hxx b/Modules/IO/ImageIO/include/otbImageFileWriter.hxx index c3cb72d50aa8863e0e479870ae4b3c9637e298b7..7b9f5fdfea0c44f61757ae7753e91fe8b59312b2 100644 --- a/Modules/IO/ImageIO/include/otbImageFileWriter.hxx +++ b/Modules/IO/ImageIO/include/otbImageFileWriter.hxx @@ -438,8 +438,8 @@ ImageFileWriter<TInputImage> { itk::ImageFileWriterException e(__FILE__, __LINE__); std::ostringstream msg; - msg << "Cannot write image " << m_FileName.c_str() << ". Probably unsupported format or incorrect filename extension."; - e.SetDescription(msg.str().c_str()); + msg << "Cannot write image " << m_FileName << ". Probably unsupported format or incorrect filename extension."; + e.SetDescription(msg.str()); e.SetLocation(ITK_LOCATION); throw e; } @@ -455,7 +455,7 @@ ImageFileWriter<TInputImage> itk::ImageFileWriterException e(__FILE__, __LINE__); std::ostringstream msg; msg << " ImageIO is of kind GDALImageIO, but fails to dynamic_cast (this should never happen)."<< std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; } @@ -801,7 +801,7 @@ ImageFileWriter<TInputImage> msg << ioRegion; msg << "Actual:" << std::endl; msg << bufferedRegion; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); e.SetLocation(ITK_LOCATION); throw e; } diff --git a/Modules/IO/ImageIO/include/otbImageSeriesFileReaderBase.hxx b/Modules/IO/ImageIO/include/otbImageSeriesFileReaderBase.hxx index 3dbdec0a9095c72f3ddd06626124d32a96801863..655f19b9251d60bfb3c0125c3be11316eb7e7cba 100644 --- a/Modules/IO/ImageIO/include/otbImageSeriesFileReaderBase.hxx +++ b/Modules/IO/ImageIO/include/otbImageSeriesFileReaderBase.hxx @@ -110,7 +110,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> this->TestFileExistenceAndReadability(m_FileName, kFileName); std::string aLine; - std::ifstream inputFile(m_FileName.c_str(), std::ios_base::in); + std::ifstream inputFile(m_FileName, std::ios_base::in); inputFile >> aLine; if (aLine != "ENVI") @@ -247,7 +247,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> std::ostringstream msg; msg << e.GetDescription(); msg << "Image FileName : " << imageFileName << "\n"; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; } m_ListOfBandSelection.push_back(bands); @@ -414,7 +414,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> ::TestFileExistenceAndReadability(std::string& file, FileType fileType) { // Test if the file exists. - if (!itksys::SystemTools::FileExists(file.c_str())) + if (!itksys::SystemTools::FileExists(file)) { if (fileType != kImageFileName) { @@ -423,7 +423,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> msg << "The file doesn't exist. \n"; if (fileType == kFileName) msg << "Filename = " << file << "\n"; else msg << "File = " << file << "\n"; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } @@ -436,7 +436,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> std::string fullFileName = itksys::SystemTools::JoinPath(fullPath); - if (!itksys::SystemTools::FileExists(fullFileName.c_str())) + if (!itksys::SystemTools::FileExists(fullFileName)) { ImageSeriesFileReaderException e(__FILE__, __LINE__); std::ostringstream msg; @@ -444,7 +444,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> msg << "ImageFileName = " << file << "\n"; msg << "tested path = " << itksys::SystemTools::GetFilenamePath(m_FileName) << "\n"; msg << "Other Tested File = " << fullFileName << "\n"; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } @@ -458,7 +458,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage> // Test if the file can be open for reading access. std::ifstream readTester; - readTester.open(file.c_str()); + readTester.open(file); if (readTester.fail()) { readTester.close(); diff --git a/Modules/IO/KMZWriter/include/otbKmzProductWriter.hxx b/Modules/IO/KMZWriter/include/otbKmzProductWriter.hxx index de52f10d3b909ac8634235cf5e83db958a8d8a73..ae48567e508099cf9dfdbbcb7c8d6ab6d366568e 100644 --- a/Modules/IO/KMZWriter/include/otbKmzProductWriter.hxx +++ b/Modules/IO/KMZWriter/include/otbKmzProductWriter.hxx @@ -187,7 +187,7 @@ KmzProductWriter<TInputImage> logoFilename << m_Path; logoFilename << "/logo.jpeg"; - if (!itksys::SystemTools::MakeDirectory(m_Path.c_str())) + if (!itksys::SystemTools::MakeDirectory(m_Path)) { itkExceptionMacro(<< "Error while creating cache directory" << m_Path); } @@ -403,7 +403,7 @@ KmzProductWriter<TInputImage> } // Generate pathname - if (!itksys::SystemTools::MakeDirectory(m_Path.c_str())) + if (!itksys::SystemTools::MakeDirectory(m_Path)) { itkExceptionMacro(<< "Error while creating cache directory" << m_Path); } @@ -648,7 +648,7 @@ KmzProductWriter<TInputImage> kmlname << "/"; kmlname << m_FileName; kmlname << m_KmlExtension; - m_RootKmlFile.open(kmlname.str().c_str()); + m_RootKmlFile.open(kmlname.str()); m_RootKmlFile << std::fixed << std::setprecision(6); m_RootKmlFile << "<?xml version=\"1.0\" encoding=\"utf-8\"?>" << std::endl; @@ -897,7 +897,7 @@ KmzProductWriter<TInputImage> kmlname << pathname; kmlname << "/"; kmlname << y << "xt.kml"; - std::ofstream fileTest(kmlname.str().c_str()); + std::ofstream fileTest(kmlname.str()); fileTest << std::fixed << std::setprecision(6); @@ -952,7 +952,7 @@ KmzProductWriter<TInputImage> kmlname << pathname; kmlname << "/"; kmlname << y << ".kml"; - std::ofstream fileTest(kmlname.str().c_str()); + std::ofstream fileTest(kmlname.str()); fileTest << std::fixed << std::setprecision(6); @@ -1005,7 +1005,7 @@ KmzProductWriter<TInputImage> kmlname << pathname; kmlname << "/"; kmlname << y << "xt.kml"; - std::ofstream fileTest(kmlname.str().c_str()); + std::ofstream fileTest(kmlname.str()); fileTest << std::fixed << std::setprecision(6); @@ -1188,7 +1188,7 @@ KmzProductWriter<TInputImage> kmlname << pathname; kmlname << "/"; kmlname << y << ".kml"; - std::ofstream fileTest(kmlname.str().c_str()); + std::ofstream fileTest(kmlname.str()); fileTest << std::fixed << std::setprecision(6); @@ -1366,7 +1366,7 @@ KmzProductWriter<TInputImage> kmlname << m_Path; kmlname << "/"; kmlname << "bound_0" << m_KmlExtension; - std::ofstream fileTest(kmlname.str().c_str()); + std::ofstream fileTest(kmlname.str()); fileTest << std::fixed << std::setprecision(6); diff --git a/Modules/IO/TestKernel/include/otbReadDataFile.h b/Modules/IO/TestKernel/include/otbReadDataFile.h index 2d20e52d29971f6a334032edadcfebdc0ce16e60..15edbfc040fc268780f9d73943f294f4f627a10a 100644 --- a/Modules/IO/TestKernel/include/otbReadDataFile.h +++ b/Modules/IO/TestKernel/include/otbReadDataFile.h @@ -41,7 +41,7 @@ bool ReadDataFile( typedef typename itk::Statistics::ListSample<TTarget>::MeasurementType TValueType; std::ifstream ifs; - ifs.open(infname.c_str()); + ifs.open(infname); if(!ifs) { diff --git a/Modules/IO/TestKernel/src/otbTestDriver.cxx b/Modules/IO/TestKernel/src/otbTestDriver.cxx index aa0732f02dd0d8f3ada1a80e67d7702cf5baeec0..ae9237c519f8dfd3d1e5dc78dfb07a3093f30631 100644 --- a/Modules/IO/TestKernel/src/otbTestDriver.cxx +++ b/Modules/IO/TestKernel/src/otbTestDriver.cxx @@ -100,7 +100,7 @@ int parseCommandLine(int ac, char * av[], std::vector<char *>& remainingArgs) libpath += KWSYS_SHARED_FORWARD_PATH_SEP; libpath += oldenv; } - itksys::SystemTools::PutEnv(libpath.c_str()); + itksys::SystemTools::PutEnv(libpath); // on some 64 bit systems, LD_LIBRARY_PATH_64 is used before // LD_LIBRARY_PATH if it is set. It can lead the test to load // the system library instead of the expected one, so this @@ -116,7 +116,7 @@ int parseCommandLine(int ac, char * av[], std::vector<char *>& remainingArgs) libpath64 += KWSYS_SHARED_FORWARD_PATH_SEP; libpath64 += oldenv2; } - itksys::SystemTools::PutEnv(libpath64.c_str()); + itksys::SystemTools::PutEnv(libpath64); } i += 2; } @@ -136,7 +136,7 @@ int parseCommandLine(int ac, char * av[], std::vector<char *>& remainingArgs) env += KWSYS_SHARED_FORWARD_PATH_SEP; env += oldenv; } - itksys::SystemTools::PutEnv(env.c_str()); + itksys::SystemTools::PutEnv(env); i += 3; } else if (!skip && strcmp(av[i], "--help") == 0) diff --git a/Modules/IO/TestKernel/src/otbTestHelper.cxx b/Modules/IO/TestKernel/src/otbTestHelper.cxx index e7f3c1b4b979bfb19108e46a377e65b0b875f1a7..045e7008bcf069accc84b3e2e747ebcd13b4ba31 100644 --- a/Modules/IO/TestKernel/src/otbTestHelper.cxx +++ b/Modules/IO/TestKernel/src/otbTestHelper.cxx @@ -114,7 +114,7 @@ int TestHelper::RegressionTestAllImages(const StringList& baselineFilenamesImage std::cout << "Number of baseline images: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on image: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on image: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestImage(cpt, testFilenameImage.c_str(), (baseline->first).c_str(), @@ -160,7 +160,7 @@ int TestHelper::RegressionTestAllMetaData(const StringList& baselineFilenamesMet std::cout << "Number of baseline images: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on image: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on image: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestMetaData(testFilenameImage.c_str(), (baseline->first).c_str(), @@ -220,7 +220,7 @@ int TestHelper::RegressionTestAllAscii(const StringList& baselineFilenamesAscii, std::cout << "Number of baseline files: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on file: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on file: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestAsciiFile(testFilenameAscii.c_str(), (baseline->first).c_str(), @@ -283,7 +283,7 @@ int TestHelper::RegressionTestAllDiff(const StringList& baselineFilenamesAscii, std::cout << "Number of baseline files: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on file: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on file: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestDiffFile(testFilenameAscii.c_str(), (baseline->first).c_str(), @@ -333,7 +333,7 @@ int TestHelper::RegressionTestAllBinary(const StringList& baselineFilenamesBinar std::cout << "Number of baseline files: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on file: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on file: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestBinaryFile(testFilenameBinary.c_str(), (baseline->first).c_str()); @@ -378,7 +378,7 @@ int TestHelper::RegressionTestAllOgr(const StringList& baselineFilenamesOgr, std::cout << "Number of baseline OGR files: " << baselines.size() << std::endl; while (baseline != baselines.rend() && (multiResult != 0)) { - std::cout << "Testing non-regression on OGR file: " << (baseline->first).c_str() << std::endl; + std::cout << "Testing non-regression on OGR file: " << (baseline->first) << std::endl; this->ReportErrorsOff(); baseline->second = this->RegressionTestOgrFile(testFilenameOgr.c_str(), (baseline->first).c_str(), @@ -414,7 +414,7 @@ int TestHelper::RegressionTestAsciiFile(const char * testAsciiFileName, const ch std::ofstream fluxfilediff; if (m_ReportErrors) { - fluxfilediff.open(diffAsciiFileName.c_str()); + fluxfilediff.open(diffAsciiFileName); } std::string strfiletest; @@ -644,7 +644,7 @@ int TestHelper::RegressionTestDiffFile(const char * testAsciiFileName, const cha std::ofstream fluxfilediff; if (m_ReportErrors) { - fluxfilediff.open(diffAsciiFileName.c_str()); + fluxfilediff.open(diffAsciiFileName); } std::string strfiletest; diff --git a/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.hxx b/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.hxx index 397c96751f1872a3077edcd485bae8cb8ddc8714..f9ae2517b871318879e3eb6637075c037fa29ea3 100644 --- a/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.hxx +++ b/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.hxx @@ -66,14 +66,14 @@ VectorDataFileReader<TOutputVectorData> ::TestFileExistenceAndReadability() { // Test if the file exists. - if (!itksys::SystemTools::FileExists(this->m_FileName.c_str())) + if (!itksys::SystemTools::FileExists(this->m_FileName)) { VectorDataFileReaderException e(__FILE__, __LINE__); std::ostringstream msg; msg << "The file doesn't exist. " << std::endl << "Filename = " << this->m_FileName << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } @@ -82,10 +82,10 @@ VectorDataFileReader<TOutputVectorData> //Only if m_FileName speciy a filename (not a dirname) // FIXME shapefile should be able to open a directory and load the // individual shapefiles as layers - if (itksys::SystemTools::FileExists(this->m_FileName.c_str(), true) == true) + if (itksys::SystemTools::FileExists(this->m_FileName, true) == true) { std::ifstream readTester; - readTester.open(this->m_FileName.c_str()); + readTester.open(this->m_FileName); if (readTester.fail()) { readTester.close(); @@ -155,7 +155,7 @@ VectorDataFileReader<TOutputVectorData> { std::ostringstream msg; msg << " Could not create IO object for file " - << m_FileName.c_str() << std::endl; + << m_FileName << std::endl; if (m_ExceptionMessage.size()) { msg << m_ExceptionMessage; diff --git a/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.hxx b/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.hxx index d960743ec9e6bbc84c1077db6fe86e905682781c..34b003e6520e3cd51782f0ba8365d933a70e7441 100644 --- a/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.hxx +++ b/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.hxx @@ -138,7 +138,7 @@ VectorDataFileWriter<TInputVectorData> VectorDataFileWriterException e(__FILE__, __LINE__); std::ostringstream msg; msg << " Could not create IO object for file " - << m_FileName.c_str() << std::endl; + << m_FileName << std::endl; msg << " Tried to create one of the following:" << std::endl; std::list<itk::LightObject::Pointer> allobjects = itk::ObjectFactoryBase::CreateAllInstance("otbVectorDataIOBase"); @@ -151,7 +151,7 @@ VectorDataFileWriter<TInputVectorData> } msg << " You probably failed to set a file suffix, or" << std::endl; msg << " set the suffix to an unsupported type." << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); e.SetLocation(ITK_LOCATION); throw e; } diff --git a/Modules/Learning/DempsterShafer/test/otbDSFusionOfClassifiersImageFilterTest.cxx b/Modules/Learning/DempsterShafer/test/otbDSFusionOfClassifiersImageFilterTest.cxx index 9958e8d9023dab017170bde733a3c552775df98a..8c6ca0c77ffcfcffc0ebfc9a570ceb71f2a97a91 100644 --- a/Modules/Learning/DempsterShafer/test/otbDSFusionOfClassifiersImageFilterTest.cxx +++ b/Modules/Learning/DempsterShafer/test/otbDSFusionOfClassifiersImageFilterTest.cxx @@ -40,12 +40,12 @@ typedef ConfusionMatrixToMassOfBeliefType::MapOfClassesType MapO int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &mapOfClassesRefClX, ConfusionMatrixType &confusionMatrixClX) { std::ifstream inFile; - inFile.open(fileName.c_str()); + inFile.open(fileName); if (!inFile) { std::cerr << "Confusion Matrix File opening problem with file:" << std::endl; - std::cerr << fileName.c_str() << std::endl; + std::cerr << fileName << std::endl; return EXIT_FAILURE; } else diff --git a/Modules/Learning/DempsterShafer/test/otbDempsterShaferFusionTests.cxx b/Modules/Learning/DempsterShafer/test/otbDempsterShaferFusionTests.cxx index ff3652fd9a71068a738482e0f84ee8864f090460..ec32d8540c6f7d9bd8f1bbb237874af1f13c8dda 100644 --- a/Modules/Learning/DempsterShafer/test/otbDempsterShaferFusionTests.cxx +++ b/Modules/Learning/DempsterShafer/test/otbDempsterShaferFusionTests.cxx @@ -67,12 +67,12 @@ std::ostream& operator <<(std::ostream& os, const IntMassOfBeliefFunctionType::L int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &mapOfClassesRefClX, ConfusionMatrixType &confusionMatrixClX) { std::ifstream inFile; - inFile.open(fileName.c_str()); + inFile.open(fileName); if (!inFile) { std::cerr << "Confusion Matrix File opening problem with file:" << std::endl; - std::cerr << fileName.c_str() << std::endl; + std::cerr << fileName << std::endl; return EXIT_FAILURE; } else diff --git a/Modules/Learning/Sampling/src/otbSamplingRateCalculator.cxx b/Modules/Learning/Sampling/src/otbSamplingRateCalculator.cxx index f3adfd2361c68238d8f4c457658038b6981124a3..57ad455dac2f595ef5be1faea1171dd417f0afb5 100644 --- a/Modules/Learning/Sampling/src/otbSamplingRateCalculator.cxx +++ b/Modules/Learning/Sampling/src/otbSamplingRateCalculator.cxx @@ -167,7 +167,7 @@ void SamplingRateCalculator ::Write(std::string filename) { - std::ofstream file(filename.c_str(), std::ios::out | std::ios::trunc); + std::ofstream file(filename, std::ios::out | std::ios::trunc); if (file) { @@ -185,7 +185,7 @@ void SamplingRateCalculator ::Read(std::string filename) { - std::ifstream ifs(filename.c_str()); + std::ifstream ifs(filename); typedef std::vector<boost::iterator_range<std::string::const_iterator> > ListType; @@ -293,7 +293,7 @@ SamplingRateCalculator ::ReadRequiredSamples(const std::string& filename) { ClassCountMapType output; - std::ifstream ifs(filename.c_str()); + std::ifstream ifs(filename); typedef std::vector<boost::iterator_range<std::string::const_iterator> > ListType; diff --git a/Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx b/Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx index 47da4c0553e90b795d09f6d8f959033573b1429e..d005b54aa9bc10898a58a09ac4dee61d5d0dfbda 100644 --- a/Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx +++ b/Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx @@ -103,7 +103,7 @@ int otbOGRDataToClassStatisticsFilter(int argc, char* argv[]) FilterType::PolygonSizeMapType::const_iterator itPoly; std::ofstream ofs; - ofs.open(outputPath.c_str()); + ofs.open(outputPath); ofs << "# Layer 0 : polygons"<<std::endl; ofs << "# Class sample counts"<<std::endl; for (itClass = classCount.begin(); itClass != classCount.end() ; ++itClass) diff --git a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.hxx index a07cbd0890e12117ff9d3ffec0bc0eee97c231f3..8112d51d6f338bb376d892507274cb1cc4ff847d 100644 --- a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.hxx @@ -178,7 +178,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.hxx index b465a76d197eb21da943718d6662e4fd396e325e..52255ac51e365c359177e5d8be2c4ebed4fef38c 100644 --- a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.hxx @@ -185,7 +185,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.hxx index 6553874a50addc57a30a5b8bd0ad4031cd969b7a..b40394593bddb97d055b420b311f0cd34fd1dda6 100644 --- a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.hxx @@ -135,7 +135,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.hxx index e67d0fd19f7862b9c7309e7673b5047a561dfb54..0d3d4e1ef7a92a3dc10940f48efe926a26251986 100644 --- a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.hxx @@ -174,7 +174,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue> //there is no m_KNearestModel->save(filename.c_str(), name.c_str()). //We need to save the K parameter, IsRegression flag, DecisionRule and the samples. - std::ofstream ofs(filename.c_str()); + std::ofstream ofs(filename); //Save K parameter and IsRegression flag. ofs << "K=" << m_K << "\n"; ofs << "IsRegression=" << this->m_RegressionMode << "\n"; @@ -210,7 +210,7 @@ void KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue> ::Load(const std::string & filename, const std::string & itkNotUsed(name)) { - std::ifstream ifs(filename.c_str()); + std::ifstream ifs(filename); if(!ifs) { itkExceptionMacro(<<"Could not read file "<<filename); @@ -236,7 +236,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue> m_DecisionRule = (int)(fs.getFirstTopLevelNode()["DecisionRule"]); return; } - ifs.open(filename.c_str()); + ifs.open(filename); #endif //there is no m_KNearestModel->load(filename.c_str(), name.c_str()); diff --git a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.hxx index aeace69db384301c4da887b816c9da9f507d1240..cfe1cac226458bbc256102423e2888aa29e638a2 100644 --- a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.hxx @@ -238,7 +238,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> { //TODO: Rework. std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.hxx index e18d3fd285e25bb0ec590fe7b28f0b426efa2dfa..2f807898aa660c52e88ac366808badeb12f6e667 100644 --- a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.hxx @@ -364,7 +364,7 @@ template<class TInputValue, class TOutputValue> bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if (!ifs) { diff --git a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.hxx index b376625c606486c431fb4c79860a2a61730f6693..9e0ca05c8bec54e4a80765eea447ed37ba9a8768 100644 --- a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.hxx @@ -151,7 +151,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.hxx index e364d6c34bd2f780314acc059022edefc0bd6512..10508ead57bb89d90b76cc5675731ce864e7786b 100644 --- a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.hxx @@ -234,7 +234,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.hxx index 8649a4a06d6d5431e4f8322c64fa0f9ef2868c9b..a52163ddee88a537e23fb2be5bb1244f34cee585 100644 --- a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.hxx @@ -242,7 +242,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue> ::CanReadFile(const std::string & file) { std::ifstream ifs; - ifs.open(file.c_str()); + ifs.open(file); if(!ifs) { diff --git a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.hxx b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.hxx index 248a715ea482edaeca2100658201f7987484d06f..35dd418ed62b4f6efc5564c4fc69497dd73d000a 100644 --- a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.hxx +++ b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.hxx @@ -207,7 +207,7 @@ void SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> ::Save(const std::string & filename, const std::string & itkNotUsed(name)) { - std::ofstream ofs(filename.c_str()); + std::ofstream ofs(filename); if(!ofs) { itkExceptionMacro(<< "Error opening " << filename.c_str() ); @@ -234,7 +234,7 @@ void SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> ::Load(const std::string & filename, const std::string & itkNotUsed(name)) { - std::ifstream ifs(filename.c_str()); + std::ifstream ifs(filename); if( ifs.good() ) { // Check if the first line is a comment and verify the name of the model in this case. diff --git a/Modules/Learning/Supervised/test/otbConfusionMatrixMeasurementsTest.cxx b/Modules/Learning/Supervised/test/otbConfusionMatrixMeasurementsTest.cxx index 1b8acc872d11a802e11b5a3bf3c7577deb8cbb81..63e88ea0055a93bb080f73181348f3176d8ece50 100644 --- a/Modules/Learning/Supervised/test/otbConfusionMatrixMeasurementsTest.cxx +++ b/Modules/Learning/Supervised/test/otbConfusionMatrixMeasurementsTest.cxx @@ -40,12 +40,12 @@ typedef ConfusionMatrixMeasurementsType::MeasurementType Me int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &mapOfClassesRefClX, ConfusionMatrixType &confusionMatrixClX) { std::ifstream inFile; - inFile.open(fileName.c_str()); + inFile.open(fileName); if (!inFile) { std::cerr << "Confusion Matrix File opening problem with file:" << std::endl; - std::cerr << fileName.c_str() << std::endl; + std::cerr << fileName << std::endl; return EXIT_FAILURE; } else diff --git a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.hxx b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.hxx index f7318cdaaae053148ca6d88efb083f3f54b738b0..1cd01e13c47a7d1187251e46dbf4d83ac109a5b5 100644 --- a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.hxx +++ b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.hxx @@ -188,7 +188,7 @@ void SharkKMeansMachineLearningModel<TInputValue, TOutputValue> ::Save(const std::string &filename, const std::string & itkNotUsed( name )) { - std::ofstream ofs( filename.c_str()); + std::ofstream ofs( filename); if( !ofs ) { itkExceptionMacro( << "Error opening " << filename.c_str()); @@ -204,7 +204,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue> ::Load(const std::string &filename, const std::string & itkNotUsed( name )) { m_CanRead = false; - std::ifstream ifs( filename.c_str()); + std::ifstream ifs( filename); if(ifs.good()) { // Check if first line contains model name diff --git a/Modules/Learning/Unsupervised/test/otbTrainMachineLearningUnsupervisedModel.cxx b/Modules/Learning/Unsupervised/test/otbTrainMachineLearningUnsupervisedModel.cxx index a0805c29fb38defb049a9588a26e10167cb5920b..70320bbe9b28e27f92ad073944c860b79ad542ab 100644 --- a/Modules/Learning/Unsupervised/test/otbTrainMachineLearningUnsupervisedModel.cxx +++ b/Modules/Learning/Unsupervised/test/otbTrainMachineLearningUnsupervisedModel.cxx @@ -46,7 +46,7 @@ typedef MachineLearningModelRegressionType::TargetListSampleType TargetListSampl bool SharkReadDataFile(const std::string & infname, InputListSampleType * samples, TargetListSampleType * labels) { - std::ifstream ifs(infname.c_str()); + std::ifstream ifs(infname); if(!ifs) { diff --git a/Modules/OBIA/RCC8/include/otbRCC8GraphFileReader.hxx b/Modules/OBIA/RCC8/include/otbRCC8GraphFileReader.hxx index 7f6efbba21df79a3efc9dff3afb6a55d71a1da38..d472a92fbcf21cd910902e090d698245d92eaee0 100644 --- a/Modules/OBIA/RCC8/include/otbRCC8GraphFileReader.hxx +++ b/Modules/OBIA/RCC8/include/otbRCC8GraphFileReader.hxx @@ -113,7 +113,7 @@ RCC8GraphFileReader<TOutputGraph> std::string line; // open file input stream - fin.open(m_FileName.c_str()); + fin.open(m_FileName); // Test if the file has been opened correctly if (!fin) @@ -122,7 +122,7 @@ RCC8GraphFileReader<TOutputGraph> std::ostringstream msg; msg << " Could not create IO object for file "; msg << m_FileName << "." << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } diff --git a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx index c120000cb01a59937f431ae37e3e20d487f8d4d4..bbc046a40cb2e817e782c5d904ec7dda8830424f 100644 --- a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx +++ b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx @@ -134,7 +134,7 @@ RCC8GraphFileWriter<TInputGraph> std::ofstream out; // open the outputfile - out.open(m_FileName.c_str(), std::ios::out); + out.open(m_FileName, std::ios::out); // Test if the file has been opened correctly if (!out) @@ -143,7 +143,7 @@ RCC8GraphFileWriter<TInputGraph> std::ostringstream msg; msg << " Could not create IO object for file "; msg << m_FileName << "." << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } diff --git a/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx b/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx index 305e844fd5ec25c738707411850f9848d4d55b2c..294a45dd44053ab93f99b846f3a6458bb721d9dc 100644 --- a/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx +++ b/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx @@ -226,7 +226,7 @@ AeronetFileReader std::string line; // open file input stream - fin.open(m_FileName.c_str()); + fin.open(m_FileName); // Test if the file has been opened correctly if (!fin) @@ -235,7 +235,7 @@ AeronetFileReader std::ostringstream msg; msg << " Could not open IO object for file "; msg << m_FileName << "." << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } @@ -270,7 +270,7 @@ AeronetFileReader std::ostringstream msg; msg << " The file "; msg << m_FileName << " is not conform." << std::endl; - e.SetDescription(msg.str().c_str()); + e.SetDescription(msg.str()); throw e; return; } diff --git a/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx b/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx index 4ebfecb7f69fb0efbf9e162c808c918c8d3100c8..91727bd05e912dca4350f3a7950836c16bedc9ce 100644 --- a/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx +++ b/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx @@ -120,12 +120,12 @@ SpectralSensitivityReader WavelengthSpectralBandVectorType * wavelengthSpectralBand = this->GetOutput(); - if ( !itksys::SystemTools::FileExists(m_FileName.c_str()) ) + if ( !itksys::SystemTools::FileExists(m_FileName) ) { itkExceptionMacro(<< m_FileName << " does not exist."); } - std::ifstream file(m_FileName.c_str()); + std::ifstream file(m_FileName); if (!file) itkExceptionMacro(<< "Enable to read " << m_FileName << " file."); std::string line; diff --git a/Modules/Radiometry/Simulation/include/otbSatelliteRSR.hxx b/Modules/Radiometry/Simulation/include/otbSatelliteRSR.hxx index 3edaee4d7a14031dcdba5a08c6255f734f91a055..cf28e774f28f19a156135251a3a9f657d5a20063 100644 --- a/Modules/Radiometry/Simulation/include/otbSatelliteRSR.hxx +++ b/Modules/Radiometry/Simulation/include/otbSatelliteRSR.hxx @@ -40,7 +40,7 @@ void SatelliteRSR<TPrecision, TValuePrecision>::Load(const std::string & filenam //Parse 6S file Reduce spectral response //Begin by getting the number of band of the satellite //unsigned int nbBands= this->SetNbBands ( filename ); - std::ifstream fin(filename.c_str()); + std::ifstream fin(filename); if (fin.fail()) { itkExceptionMacro(<<"Error opening file" << filename); diff --git a/Modules/Radiometry/Simulation/include/otbSpectralResponse.hxx b/Modules/Radiometry/Simulation/include/otbSpectralResponse.hxx index 040dd6a6e63ecce68aeeb34b2865ae274df834a2..c0b4d6d6695d46fd20ed82a236c604f22e1bce86 100644 --- a/Modules/Radiometry/Simulation/include/otbSpectralResponse.hxx +++ b/Modules/Radiometry/Simulation/include/otbSpectralResponse.hxx @@ -46,7 +46,7 @@ void SpectralResponse<TPrecision, TValuePrecision>::Load(const std::string & fil { //Parse JPL file spectral response (ASCII file) //Begin line 27 - std::ifstream fin(filename.c_str()); + std::ifstream fin(filename); if (fin.fail()) { itkExceptionMacro(<<"Error opening file" << filename); diff --git a/Modules/Radiometry/Simulation/src/otbSoilDataBase.cxx b/Modules/Radiometry/Simulation/src/otbSoilDataBase.cxx index 6c7686a3ecf6ce509a44d04611d0946d7950df73..9229fb6f67628952242addb9d6b85417c481b19b 100644 --- a/Modules/Radiometry/Simulation/src/otbSoilDataBase.cxx +++ b/Modules/Radiometry/Simulation/src/otbSoilDataBase.cxx @@ -77,7 +77,7 @@ double SoilDataBase::GetReflectance(size_t SoilIndex, WavelenghtType wl) const size_t SoilDataBase::CountColumns(std::string fileName) const { - std::ifstream ifile(fileName.c_str()); + std::ifstream ifile(fileName); std::string line; if (ifile.is_open()) { diff --git a/Modules/Radiometry/Simulation/test/otbReduceSpectralResponse.cxx b/Modules/Radiometry/Simulation/test/otbReduceSpectralResponse.cxx index 388f66977591e377c4c30bab58112cd857f4e7c0..c0bf1ede8aaa7ddd0efcc001b88cd43ca1045dbb 100644 --- a/Modules/Radiometry/Simulation/test/otbReduceSpectralResponse.cxx +++ b/Modules/Radiometry/Simulation/test/otbReduceSpectralResponse.cxx @@ -140,7 +140,7 @@ int otbReduceSpectralResponseSimpleValues(int argc, char * argv[]) // Let's create a satellite RSR with 2 bands and constant solar irradiance per band // Disjoint bands and B0 is shorter wavelength than B1 for simplicity const std::string RSRfileName(argv[1]); - std::ofstream satFile(RSRfileName.c_str()); + std::ofstream satFile(RSRfileName); const ResponseType::PrecisionType lambdaMinB0(0.45); const ResponseType::PrecisionType lambdaMaxB0(0.65); const ResponseType::PrecisionType lambdaMinB1(0.75); diff --git a/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.hxx b/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.hxx index 17ff2fd876db850e7876a84246be62e926a4d2ac..a88e6b9734c9df9f822da2c760ac6ce46ac8dd97 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.hxx +++ b/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.hxx @@ -611,7 +611,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of disparity map."); e.SetDataObject(horizDisp); throw e; diff --git a/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.hxx b/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.hxx index 47b79280814cae5c5f405f289ff626c1a4d48ceb..cd7c0d37b54554f765b87e58a5708186d42e39a9 100644 --- a/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.hxx +++ b/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.hxx @@ -263,7 +263,7 @@ FineRegistrationImageFilter<TInputImage, TOutputCorrelation, TOutputDisplacement std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(fixedPtr); throw e; diff --git a/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.hxx b/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.hxx index 2a617111877cc6fd5c4ccd6e1839458d07eb112e..a6919937f9a3e4d5e260af4137ea0b0393bf0b47 100644 --- a/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.hxx +++ b/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.hxx @@ -461,7 +461,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of left image."); e.SetDataObject(inLeftPtr); throw e; @@ -485,7 +485,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of right image."); e.SetDataObject(inRightPtr); throw e; diff --git a/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.hxx b/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.hxx index ec833aded21bddd1c9cac05cba60a2d6611b7143..2b341dcba838d11bd450c4f49fe0be3f59a41322 100644 --- a/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.hxx +++ b/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.hxx @@ -513,7 +513,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of left image."); e.SetDataObject(inLeftPtr); throw e; @@ -547,7 +547,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> // std::ostringstream msg; // msg << this->GetNameOfClass() // << "::GenerateInputRequestedRegion()"; -// e.SetLocation(msg.str().c_str()); +// e.SetLocation(msg.str()); // e.SetDescription("Requested region is (at least partially) outside the largest possible region of right image."); // e.SetDataObject(inRightPtr); // throw e; diff --git a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.hxx b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.hxx index 27c0992a9fb320ae9c1a4285fc8d9eca286f74c1..83512b4f1b736e29a2531ff98d34961f44007e2f 100644 --- a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.hxx +++ b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.hxx @@ -247,7 +247,7 @@ AdhesionCorrectionFilter<TImage, TMask> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(canny_edges); throw e; @@ -270,7 +270,7 @@ AdhesionCorrectionFilter<TImage, TMask> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(old_disparityPtr); throw e; @@ -293,7 +293,7 @@ AdhesionCorrectionFilter<TImage, TMask> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(old_maskPtr); throw e; @@ -316,7 +316,7 @@ AdhesionCorrectionFilter<TImage, TMask> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(canny_disparity); throw e; @@ -339,7 +339,7 @@ AdhesionCorrectionFilter<TImage, TMask> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(subpixelmaskPtr); throw e; diff --git a/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.hxx b/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.hxx index ddd083de1775306547773f5451b6417c98b2433f..296900da8f0900b374aa2e4e1fbbce50a9b3888a 100644 --- a/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.hxx +++ b/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.hxx @@ -235,7 +235,7 @@ void StereoSensorModelToElevationFilter<TInputImage, TOutputHeight> std::ostringstream msg; msg << this->GetNameOfClass() << "::GenerateInputRequestedRegion()"; - e.SetLocation(msg.str().c_str()); + e.SetLocation(msg.str()); e.SetDescription("Requested region is (at least partially) outside the largest possible region of image 1."); e.SetDataObject(masterPtr); throw e; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarDataSetSummary.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarDataSetSummary.cpp index 0ae0db34d2b195e5739a527e6bfedf3e12e9d9ed..2a57343504039caa39c9df59a59b1c1e4c36844d 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarDataSetSummary.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarDataSetSummary.cpp @@ -43,13 +43,13 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "sar_chn:" << data._sar_chn << std::endl; - os << "scene_id:" << data._scene_id.c_str() << std::endl; + os << "scene_id:" << data._scene_id << std::endl; - os << "scene_des:" << data._scene_des.c_str() << std::endl; + os << "scene_des:" << data._scene_des << std::endl; - os << "inp_sctim:" << data._inp_sctim.c_str() << std::endl; + os << "inp_sctim:" << data._inp_sctim << std::endl; - os << "asc_des:" << data._asc_des.c_str() << std::endl; + os << "asc_des:" << data._asc_des << std::endl; os << "pro_lat:" << data._pro_lat << std::endl; @@ -57,7 +57,7 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "pro_head:" << data._pro_head << std::endl; - os << "ellip_des:" << data._ellip_des.c_str() << std::endl; + os << "ellip_des:" << data._ellip_des << std::endl; os << "ellip_maj:" << data._ellip_maj << std::endl; @@ -73,9 +73,9 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "scene_len:" << data._scene_len << std::endl; os << "scene_wid:" << data._scene_wid << std::endl; os << "nchn:" << data._nchn << std::endl; - os << "mission_id:" << data._mission_id.c_str() << std::endl; - os << "sensor_id:" << data._sensor_id.c_str() << std::endl; - os << "orbit_num:" << data._orbit_num.c_str() << std::endl; + os << "mission_id:" << data._mission_id << std::endl; + os << "sensor_id:" << data._sensor_id << std::endl; + os << "orbit_num:" << data._orbit_num << std::endl; os << "plat_lat:" << data._plat_lat << std::endl; @@ -90,9 +90,9 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "wave_length:" << data._wave_length << std::endl; - os << "motion_comp:" << data._motion_comp.c_str() << std::endl; + os << "motion_comp:" << data._motion_comp << std::endl; - os << "pulse_code:" << data._pulse_code.c_str() << std::endl; + os << "pulse_code:" << data._pulse_code << std::endl; for (int i = 0; i < 5; i++) { @@ -112,9 +112,9 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "rng_length:" << data._rng_length << std::endl; - os << "baseband_f:" << data._baseband_f.c_str() << std::endl; + os << "baseband_f:" << data._baseband_f << std::endl; - os << "rngcmp_f:" << data._rngcmp_f.c_str() << std::endl; + os << "rngcmp_f:" << data._rngcmp_f << std::endl; os << "gn_polar:" << data._gn_polar << std::endl; @@ -122,7 +122,7 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "chn_bits:" << data._chn_bits << std::endl; - os << "quant_desc:" << data._quant_desc.c_str() << std::endl; + os << "quant_desc:" << data._quant_desc << std::endl; os << "i_bias:" << data._i_bias << std::endl; @@ -134,21 +134,21 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "fa:" << data._fa << std::endl; - os << "sat_bintim:" << data._sat_bintim.c_str() << std::endl; + os << "sat_bintim:" << data._sat_bintim << std::endl; - os << "sat_clktim:" << data._sat_clktim.c_str() << std::endl; + os << "sat_clktim:" << data._sat_clktim << std::endl; - os << "sat_clkinc:" << data._sat_clkinc.c_str() << std::endl; + os << "sat_clkinc:" << data._sat_clkinc << std::endl; - os << "fac_id:" << data._fac_id.c_str() << std::endl; + os << "fac_id:" << data._fac_id << std::endl; - os << "sys_id:" << data._sys_id.c_str() << std::endl; + os << "sys_id:" << data._sys_id << std::endl; - os << "ver_id:" << data._ver_id.c_str() << std::endl; + os << "ver_id:" << data._ver_id << std::endl; - os << "prod_type:" << data._prod_type.c_str() << std::endl; + os << "prod_type:" << data._prod_type << std::endl; - os << "algor_id:" << data._algor_id.c_str() << std::endl; + os << "algor_id:" << data._algor_id << std::endl; os << "n_azilok:" << data._n_azilok << std::endl; @@ -162,11 +162,11 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "bnd_rng:" << data._bnd_rng << std::endl; - os << "azi_weight:" << data._azi_weight.c_str() << std::endl; + os << "azi_weight:" << data._azi_weight << std::endl; - os << "rng_weight:" << data._rng_weight.c_str() << std::endl; + os << "rng_weight:" << data._rng_weight << std::endl; - os << "data_inpsrc:" << data._data_inpsrc.c_str() << std::endl; + os << "data_inpsrc:" << data._data_inpsrc << std::endl; os << "rng_res:" << data._rng_res << std::endl; @@ -180,9 +180,9 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "crt_dopcen[1]:" << data._crt_dopcen[1] << std::endl; os << "crt_dopcen[2]:" << data._crt_dopcen[2] << std::endl; - os << "time_dir_pix:" << data._time_dir_pix.c_str() << std::endl; + os << "time_dir_pix:" << data._time_dir_pix << std::endl; - os << "time_dir_lin:" << data._time_dir_lin.c_str() << std::endl; + os << "time_dir_lin:" << data._time_dir_lin << std::endl; os << "alt_rate[0]:" << data._alt_rate[0] << std::endl; os << "alt_rate[1]:" << data._alt_rate[1] << std::endl; @@ -192,17 +192,17 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarDataSetSummary& data) os << "crt_rate[1]:" << data._crt_rate[1] << std::endl; os << "crt_rate[2]:" << data._crt_rate[2] << std::endl; - os << "clutter_lock:" << data._line_cont.c_str() << std::endl; + os << "clutter_lock:" << data._line_cont << std::endl; - os << "clutter_lock:" << data._clutter_lock.c_str() << std::endl; + os << "clutter_lock:" << data._clutter_lock << std::endl; - os << "auto_focus:" << data._auto_focus.c_str() << std::endl; + os << "auto_focus:" << data._auto_focus << std::endl; os << "line_spacing:" << data._line_spacing << std::endl; os << "pix_spacing:" << data._pix_spacing << std::endl; - os << "rngcmp_desg:" << data._rngcmp_desg.c_str() << std::endl; + os << "rngcmp_desg:" << data._rngcmp_desg << std::endl; os << "dopcen_range[0]:" << data._dopcen_range[0] << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFacilityData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFacilityData.cpp index ee02029a9c3567bc0810333a783a1282ab0a827c..9f9d54801a7928676a681867f123dc43268de9ce 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFacilityData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFacilityData.cpp @@ -39,9 +39,9 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const AlosPalsarFacilityData& data) { - os << "last_release_qc_date:" << data._last_release_qc_date.c_str() << std::endl; + os << "last_release_qc_date:" << data._last_release_qc_date << std::endl; - os << "last_release_cal_date:" << data._last_release_cal_date.c_str() << std::endl; + os << "last_release_cal_date:" << data._last_release_cal_date << std::endl; os << "qa_summary_flag:" << data._qa_summary_flag << std::endl; @@ -147,9 +147,9 @@ namespace ossimplugins os << "proc_noise_scale_fact:" << data._proc_noise_scale_fact << std::endl; - os << "K_gen_date:" << data._K_gen_date.c_str() << std::endl; + os << "K_gen_date:" << data._K_gen_date << std::endl; - os << "K_vers_num:" << data._K_vers_num.c_str() << std::endl; + os << "K_vers_num:" << data._K_vers_num << std::endl; os << "num_duplic_input_lines:" << data._num_duplic_input_lines << std::endl; @@ -161,21 +161,21 @@ namespace ossimplugins os << "out_image_max_value:" << data._out_image_max_value << std::endl; - os << "time_raw_data_first_input:" << data._time_raw_data_first_input.c_str() << std::endl; + os << "time_raw_data_first_input:" << data._time_raw_data_first_input << std::endl; - os << "time_asc_node_state_vectors:" << data._time_asc_node_state_vectors.c_str() << std::endl; + os << "time_asc_node_state_vectors:" << data._time_asc_node_state_vectors << std::endl; - os << "asc_node_pos_X_comp:" << data._asc_node_pos_X_comp.c_str() << std::endl; + os << "asc_node_pos_X_comp:" << data._asc_node_pos_X_comp << std::endl; - os << "asc_node_pos_Y_comp:" << data._asc_node_pos_Y_comp.c_str() << std::endl; + os << "asc_node_pos_Y_comp:" << data._asc_node_pos_Y_comp << std::endl; - os << "asc_node_pos_Z_comp:" << data._asc_node_pos_Z_comp.c_str() << std::endl; + os << "asc_node_pos_Z_comp:" << data._asc_node_pos_Z_comp << std::endl; - os << "asc_node_vel_X_comp:" << data._asc_node_vel_X_comp.c_str() << std::endl; + os << "asc_node_vel_X_comp:" << data._asc_node_vel_X_comp << std::endl; - os << "asc_node_vel_Y_comp:" << data._asc_node_vel_Y_comp.c_str() << std::endl; + os << "asc_node_vel_Y_comp:" << data._asc_node_vel_Y_comp << std::endl; - os << "asc_node_vel_Z_comp:" << data._asc_node_vel_Z_comp.c_str() << std::endl; + os << "asc_node_vel_Z_comp:" << data._asc_node_vel_Z_comp << std::endl; os << "out_pixel_bit_length:" << data._out_pixel_bit_length << std::endl; @@ -209,19 +209,19 @@ namespace ossimplugins os << "range_lines_skip_factor:" << data._range_lines_skip_factor << std::endl; - os << "time_of_inp_state_vectors:" << data._time_of_inp_state_vectors.c_str() << std::endl; + os << "time_of_inp_state_vectors:" << data._time_of_inp_state_vectors << std::endl; - os << "inp_state_vect_pos_X_comp:" << data._inp_state_vect_pos_X_comp.c_str() << std::endl; + os << "inp_state_vect_pos_X_comp:" << data._inp_state_vect_pos_X_comp << std::endl; - os << "inp_state_vect_pos_Y_comp:" << data._inp_state_vect_pos_Y_comp.c_str() << std::endl; + os << "inp_state_vect_pos_Y_comp:" << data._inp_state_vect_pos_Y_comp << std::endl; - os << "inp_state_vect_pos_Z_comp:" << data._inp_state_vect_pos_Z_comp.c_str() << std::endl; + os << "inp_state_vect_pos_Z_comp:" << data._inp_state_vect_pos_Z_comp << std::endl; - os << "inp_state_vect_vel_Vx_comp:" << data._inp_state_vect_vel_Vx_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vx_comp:" << data._inp_state_vect_vel_Vx_comp << std::endl; - os << "inp_state_vect_vel_Vy_comp:" << data._inp_state_vect_vel_Vy_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vy_comp:" << data._inp_state_vect_vel_Vy_comp << std::endl; - os << "inp_state_vect_vel_Vz_comp:" << data._inp_state_vect_vel_Vz_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vz_comp:" << data._inp_state_vect_vel_Vz_comp << std::endl; os << "inp_state_vector_type_flag:" << data._inp_state_vector_type_flag << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFileDescriptor.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFileDescriptor.cpp index 918029a863cfd7ba86f66f08258599040ec443a7..1c89b92e2eeed9889a70e52efd94f7c0603ec3f8 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFileDescriptor.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarFileDescriptor.cpp @@ -40,21 +40,21 @@ AlosPalsarFileDescriptor::~AlosPalsarFileDescriptor() std::ostream& operator<<(std::ostream& os, const AlosPalsarFileDescriptor& data) { - os << "ascii_flag:" << data._ascii_flag.c_str() << std::endl; - os << "continuation_flag:" << data._continuation_flag.c_str() << std::endl; - os << "format_doc:" << data._format_doc.c_str() << std::endl; - os << "format_ver:" << data._format_ver.c_str() << std::endl; - os << "design_rev:" << data._design_rev.c_str() << std::endl; - os << "software_id:" << data._software_id.c_str() << std::endl; + os << "ascii_flag:" << data._ascii_flag << std::endl; + os << "continuation_flag:" << data._continuation_flag << std::endl; + os << "format_doc:" << data._format_doc << std::endl; + os << "format_ver:" << data._format_ver << std::endl; + os << "design_rev:" << data._design_rev << std::endl; + os << "software_id:" << data._software_id << std::endl; os << "file_num:" << data._file_num << std::endl; - os << "file_name:" << data._file_name.c_str() << std::endl; - os << "rec_seq:" << data._rec_seq.c_str() << std::endl; + os << "file_name:" << data._file_name << std::endl; + os << "rec_seq:" << data._rec_seq << std::endl; os << "seq_loc:" << data._seq_loc << std::endl; os << "seq_len:" << data._seq_len << std::endl; - os << "rec_code:" << data._rec_code.c_str() << std::endl; + os << "rec_code:" << data._rec_code << std::endl; os << "code_loc:" << data._code_loc << std::endl; os << "code_len:" << data._code_len << std::endl; - os << "rec_len:" << data._rec_len.c_str() << std::endl; + os << "rec_len:" << data._rec_len << std::endl; os << "rlen_loc:" << data._rlen_loc << std::endl; os << "rlen_len:" << data._rlen_len << std::endl; os << "n_dataset:" << data._n_dataset << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarMapProjectionData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarMapProjectionData.cpp index 83c915e8107a260b5d669d896a6e4238c8a6d9dc..2025e86d87ba0288313780ca5641b8acef87db8c 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarMapProjectionData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarMapProjectionData.cpp @@ -39,7 +39,7 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const AlosPalsarMapProjectionData& data) { - os << "map_proj_des:" << data._map_proj_des.c_str() << std::endl; + os << "map_proj_des:" << data._map_proj_des << std::endl; os << "num_pix_in_line:" << data._num_pix_in_line << std::endl; @@ -57,7 +57,7 @@ namespace ossimplugins os << "platform_heading:" << data._platform_heading << std::endl; - os << "name_of_ref_ellipsoid:" << data._name_of_ref_ellipsoid.c_str() << std::endl; + os << "name_of_ref_ellipsoid:" << data._name_of_ref_ellipsoid << std::endl; os << "semi_maj_axis:" << data._semi_maj_axis << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarPlatformPositionData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarPlatformPositionData.cpp index 3a2cfa8a568f7dd9f83804a36e44343b55df9b6e..a9460a2efd6d782412c774eb1b63eabd8a2cecd7 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarPlatformPositionData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/AlosPalsar/AlosPalsarPlatformPositionData.cpp @@ -40,7 +40,7 @@ AlosPalsarPlatformPositionData::~AlosPalsarPlatformPositionData() std::ostream& operator<<(std::ostream& os, const AlosPalsarPlatformPositionData& data) { - os << "orbit_ele_desg:" << data._orbit_ele_desg.c_str() << std::endl; + os << "orbit_ele_desg:" << data._orbit_ele_desg << std::endl; for (int i = 0; i < 6; i++) { @@ -61,7 +61,7 @@ std::ostream& operator<<(std::ostream& os, const AlosPalsarPlatformPositionData& os << "data_int:" << data._data_int << std::endl; - os << "ref_coord:" << data._ref_coord.c_str() << std::endl; + os << "ref_coord:" << data._ref_coord << std::endl; os << "hr_angle:" << data._hr_angle << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/AntennaElevationPatterns.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/AntennaElevationPatterns.cpp index fe6364932fd323ba616b7e1c032d9033f20bb99b..dc6d5e427ba8c33dd29c8f1feaaa9e9233c25b37 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/AntennaElevationPatterns.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/AntennaElevationPatterns.cpp @@ -38,11 +38,11 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const AntennaElevationPatterns& data) { - os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl; + os<<"zero_doppler_time:"<<data._zero_doppler_time <<std::endl; os<<"attach_flag:"<<data._attach_flag<<std::endl; - os<<"swath:"<<data._swath.c_str()<<std::endl; + os<<"swath:"<<data._swath <<std::endl; for (int i = 0; i<33; i++) { os<<"elevation pattern:"<<data._elevation_pattern[i]<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/ChirpParameters.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/ChirpParameters.cpp index 2a65f68d72bb270fba25fc843371e69afc9135eb..16bae871ec4b80d57ef429e39e416f31e04fefbf 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/ChirpParameters.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/ChirpParameters.cpp @@ -38,13 +38,13 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const ChirpParameters& data) { - os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl; + os<<"zero_doppler_time:"<<data._zero_doppler_time <<std::endl; os<<"attach_flag:"<<data._attach_flag<<std::endl; - os<<"swath:"<<data._swath.c_str()<<std::endl; + os<<"swath:"<<data._swath <<std::endl; - os<<"polar:"<<data._polar.c_str()<<std::endl; + os<<"polar:"<<data._polar <<std::endl; os<<"chirp_width:"<<data._chirp_width<<std::endl; @@ -62,7 +62,7 @@ namespace ossimplugins os<<"ref_chirp_power:"<<data._ref_chirp_power<<std::endl; - os<<"normalisation_source:"<<data._normalisation_source.c_str()<<std::endl; + os<<"normalisation_source:"<<data._normalisation_source <<std::endl; for (int i = 0 ; i<352; i++) { os<<"cal_pulse_info["<<i<<"]:"<<data._cal_pulse_info[i]<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/DopplerCentroidParameters.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/DopplerCentroidParameters.cpp index 6e91ba69c25d478cc2ddc979815c86249ec7414a..1661b334d363ab79978429f22989c82afe7008a3 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/DopplerCentroidParameters.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/DopplerCentroidParameters.cpp @@ -38,7 +38,7 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const DopplerCentroidParameters& data) { - os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl; + os<<"zero_doppler_time:"<<data._zero_doppler_time <<std::endl; os<<"attach_flag:"<<data._attach_flag<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/GeolocationGrid.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/GeolocationGrid.cpp index d035dbf6feea078bc1936ba85e3b807811a4e993..e310929d587f7bfd4c8eb64fce01a7ae050ccb94 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/GeolocationGrid.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/GeolocationGrid.cpp @@ -72,9 +72,9 @@ namespace ossimplugins os<<"longs["<<i<<"]:"<<data._longs[i]<<std::endl; } - os<<"last_zero_doppler_time:"<<data._last_zero_doppler_time.c_str()<<std::endl; + os<<"last_zero_doppler_time:"<<data._last_zero_doppler_time <<std::endl; - os<<"last_line_tie_points:"<<data._last_line_tie_points.c_str()<<std::endl; + os<<"last_line_tie_points:"<<data._last_line_tie_points <<std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/MainProcessingParameters.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/MainProcessingParameters.cpp index 1f0816a0def15d4629e46d46d4cbc6130b2e52a6..ec997b9c8ef82898ee8f8fd726362f47f5f352a6 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/MainProcessingParameters.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/MainProcessingParameters.cpp @@ -38,17 +38,17 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const MainProcessingParameters& data) { - os<<"first_zero_doppler_time:"<<data._first_zero_doppler_time.c_str()<<std::endl; + os<<"first_zero_doppler_time:"<<data._first_zero_doppler_time <<std::endl; os<<"attach_flag:"<<data._attach_flag<<std::endl; - os<<"last_zero_doppler_time:"<<data._last_zero_doppler_time.c_str()<<std::endl; + os<<"last_zero_doppler_time:"<<data._last_zero_doppler_time <<std::endl; - os<<"work_order_id:"<<data._work_order_id.c_str()<<std::endl; + os<<"work_order_id:"<<data._work_order_id <<std::endl; os<<"time_diff:"<<data._time_diff<<std::endl; - os<<"swath_num:"<<data._swath_num.c_str()<<std::endl; + os<<"swath_num:"<<data._swath_num <<std::endl; os<<"range_spacing:"<<data._range_spacing<<std::endl; @@ -60,7 +60,7 @@ namespace ossimplugins os<<"num_samples_per_line:"<<data._num_samples_per_line<<std::endl; - os<<"data_type:"<<data._data_type.c_str()<<std::endl; + os<<"data_type:"<<data._data_type <<std::endl; os<<"num_range_lines_per_burst:"<<data._num_range_lines_per_burst<<std::endl; @@ -96,21 +96,21 @@ namespace ossimplugins os<<"gm_rng_comp_inv_filter_flag:"<<data._gm_rng_comp_inv_filter_flag<<std::endl; - os<<"raw_data_analysis:"<<data._raw_data_analysis.c_str()<<std::endl; + os<<"raw_data_analysis:"<<data._raw_data_analysis <<std::endl; - os<<"start_time_mds1:"<<data._start_time_mds1.c_str()<<std::endl; + os<<"start_time_mds1:"<<data._start_time_mds1 <<std::endl; - os<<"start_time_mds2:"<<data._start_time_mds2.c_str()<<std::endl; + os<<"start_time_mds2:"<<data._start_time_mds2 <<std::endl; - os<<"parameter_code:"<<data._parameter_code.c_str()<<std::endl; + os<<"parameter_code:"<<data._parameter_code <<std::endl; - os<<"errors_counters:"<<data._errors_counters.c_str()<<std::endl; + os<<"errors_counters:"<<data._errors_counters <<std::endl; - os<<"image_parameters 1:"<<data._image_parameters1.c_str()<<std::endl; + os<<"image_parameters 1:"<<data._image_parameters1 <<std::endl; os<<"prf_values[0]:"<<data._prf_values[0]<<std::endl; - os<<"image_parameters 1:"<<data._image_parameters2.c_str()<<std::endl; + os<<"image_parameters 1:"<<data._image_parameters2 <<std::endl; os<<"first_proc_range_samp:"<<data._first_proc_range_samp<<std::endl; @@ -122,13 +122,13 @@ namespace ossimplugins os<<"num_looks_range:"<<data._num_looks_range<<std::endl; - os<<"filter_range:"<<data._filter_range.c_str()<<std::endl; + os<<"filter_range:"<<data._filter_range <<std::endl; os<<"filter_coef_range:"<<data._filter_coef_range<<std::endl; - os<<"bandwidth:"<<data._bandwidth.c_str()<<std::endl; + os<<"bandwidth:"<<data._bandwidth <<std::endl; - os<<"nominal_chirp:"<<data._nominal_chirp.c_str()<<std::endl; + os<<"nominal_chirp:"<<data._nominal_chirp <<std::endl; os<<"num_lines_proc:"<<data._num_lines_proc<<std::endl; @@ -138,7 +138,7 @@ namespace ossimplugins os<<"to_bw_az:"<<data._to_bw_az<<std::endl; - os<<"filter_az:"<<data._filter_az.c_str()<<std::endl; + os<<"filter_az:"<<data._filter_az <<std::endl; os<<"filter_coef_az:"<<data._filter_coef_az<<std::endl; @@ -150,29 +150,29 @@ namespace ossimplugins os<<"dop_amb_coef:"<<data._dop_amb_coef<<std::endl; - os<<"calibration_factors:"<<data._calibration_factors.c_str()<<std::endl; + os<<"calibration_factors:"<<data._calibration_factors <<std::endl; - os<<"noise_estimation:"<<data._noise_estimation.c_str()<<std::endl; + os<<"noise_estimation:"<<data._noise_estimation <<std::endl; - os<<"output_statistics:"<<data._output_statistics.c_str()<<std::endl; + os<<"output_statistics:"<<data._output_statistics <<std::endl; os<<"avg_scene_height_ellpsoid:"<<data._avg_scene_height_ellpsoid<<std::endl; - os<<"echo_comp:"<<data._echo_comp.c_str()<<std::endl; + os<<"echo_comp:"<<data._echo_comp <<std::endl; - os<<"echo_comp_ratio:"<<data._echo_comp_ratio.c_str()<<std::endl; + os<<"echo_comp_ratio:"<<data._echo_comp_ratio <<std::endl; - os<<"init_cal_comp:"<<data._init_cal_comp.c_str()<<std::endl; + os<<"init_cal_comp:"<<data._init_cal_comp <<std::endl; - os<<"init_cal_ratio:"<<data._init_cal_ratio.c_str()<<std::endl; + os<<"init_cal_ratio:"<<data._init_cal_ratio <<std::endl; - os<<"per_cal_comp:"<<data._per_cal_comp.c_str()<<std::endl; + os<<"per_cal_comp:"<<data._per_cal_comp <<std::endl; - os<<"per_cal_ratio:"<<data._per_cal_ratio.c_str()<<std::endl; + os<<"per_cal_ratio:"<<data._per_cal_ratio <<std::endl; - os<<"noise_comp:"<<data._noise_comp.c_str()<<std::endl; + os<<"noise_comp:"<<data._noise_comp <<std::endl; - os<<"noise_comp_ratio:"<<data._noise_comp_ratio.c_str()<<std::endl; + os<<"noise_comp_ratio:"<<data._noise_comp_ratio <<std::endl; os<<"beam_overlap[0]:"<<data._beam_overlap[0]<<std::endl; os<<"beam_overlap[1]:"<<data._beam_overlap[1]<<std::endl; @@ -185,7 +185,7 @@ namespace ossimplugins os<<"lines_per_burst[3]:"<<data._lines_per_burst[3]<<std::endl; os<<"lines_per_burst[4]:"<<data._lines_per_burst[4]<<std::endl; - os<<"time_first_SS1_echo:"<<data._time_first_SS1_echo.c_str()<<std::endl; + os<<"time_first_SS1_echo:"<<data._time_first_SS1_echo <<std::endl; os<<"state_vector_time_1:"<<data._state_vector_time_1_day<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/SQ_ADSR.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/SQ_ADSR.cpp index 402e6d86b04958497a8e5f141ddf4dc09eb5f35b..bf044185e32f9d05b2e5c2255d2c4e1506e6432e 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/SQ_ADSR.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/SQ_ADSR.cpp @@ -39,7 +39,7 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const SQ_ADSR& data) { - os<<"zero_doppler_time:"<<data._zero_doppler_time.c_str()<<std::endl; + os<<"zero_doppler_time:"<<data._zero_doppler_time <<std::endl; os<<"attach_flag:"<<data._attach_flag<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/dsd.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/dsd.cpp index cc92daf882af607a4c104cf3f2d65856e83fab5b..0ffc7adfe3e00e234e194a35e247d9135c2a5924 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/dsd.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/dsd.cpp @@ -37,9 +37,9 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const dsd& data) { - os<<"ds_name:"<<data._ds_name.c_str()<<std::endl; - os<<"ds_type:"<<data._ds_type.c_str()<<std::endl; - os<<"filename:"<<data._filename.c_str()<<std::endl; + os<<"ds_name:"<<data._ds_name <<std::endl; + os<<"ds_type:"<<data._ds_type <<std::endl; + os<<"filename:"<<data._filename <<std::endl; os<<"ds_offset:"<<data._ds_offset<<std::endl; os<<"ds_size:"<<data._ds_size<<std::endl; os<<"num_dsr:"<<data._num_dsr<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/mph.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/mph.cpp index 35a51613da64124074e7b95a74b9e30dbf7161fb..e3ad3ae65cc4ac35fe29eb8077cc4eb65ac37da3 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/mph.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/mph.cpp @@ -37,163 +37,163 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const mph& data) { - os<<"product_name:"<<data._product_name.c_str()<<std::endl; + os<<"product_name:"<<data._product_name <<std::endl; - os<<"product:"<<data._product.c_str()<<std::endl; + os<<"product:"<<data._product <<std::endl; - os<<"proc_stage_title:"<<data._proc_stage_title.c_str()<<std::endl; + os<<"proc_stage_title:"<<data._proc_stage_title <<std::endl; - os<<"proc_stage:"<<data._proc_stage.c_str()<<std::endl; + os<<"proc_stage:"<<data._proc_stage <<std::endl; - os<<"ref_doc_title:"<<data._ref_doc_title.c_str()<<std::endl; + os<<"ref_doc_title:"<<data._ref_doc_title <<std::endl; - os<<"ref_doc:"<<data._ref_doc.c_str()<<std::endl; + os<<"ref_doc:"<<data._ref_doc <<std::endl; - os<<"acq_stat_id_title:"<<data._acq_stat_id_title.c_str()<<std::endl; + os<<"acq_stat_id_title:"<<data._acq_stat_id_title <<std::endl; - os<<"acq_station:"<<data._acq_station.c_str()<<std::endl; + os<<"acq_station:"<<data._acq_station <<std::endl; - os<<"proc_center_title:"<<data._proc_center_title.c_str()<<std::endl; + os<<"proc_center_title:"<<data._proc_center_title <<std::endl; - os<<"proc_center:"<<data._proc_center.c_str()<<std::endl; + os<<"proc_center:"<<data._proc_center <<std::endl; - os<<"proc_time_title:"<<data._proc_time_title.c_str()<<std::endl; + os<<"proc_time_title:"<<data._proc_time_title <<std::endl; - os<<"proc_time:"<<data._proc_time.c_str()<<std::endl; + os<<"proc_time:"<<data._proc_time <<std::endl; - os<<"soft_version_title:"<<data._soft_version_title.c_str()<<std::endl; + os<<"soft_version_title:"<<data._soft_version_title <<std::endl; - os<<"soft_version:"<<data._soft_version.c_str()<<std::endl; + os<<"soft_version:"<<data._soft_version <<std::endl; - os<<"sensing_start_title:"<<data._sensing_start_title.c_str()<<std::endl; + os<<"sensing_start_title:"<<data._sensing_start_title <<std::endl; - os<<"sensing_start:"<<data._sensing_start.c_str()<<std::endl; + os<<"sensing_start:"<<data._sensing_start <<std::endl; - os<<"sensing_stop_title:"<<data._sensing_stop_title.c_str()<<std::endl; + os<<"sensing_stop_title:"<<data._sensing_stop_title <<std::endl; - os<<"sensing_stop:"<<data._sensing_stop.c_str()<<std::endl; + os<<"sensing_stop:"<<data._sensing_stop <<std::endl; - os<<"phase_title:"<<data._phase_title.c_str()<<std::endl; + os<<"phase_title:"<<data._phase_title <<std::endl; - os<<"phase:"<<data._phase.c_str()<<std::endl; + os<<"phase:"<<data._phase <<std::endl; - os<<"cycle_title:"<<data._cycle_title.c_str()<<std::endl; + os<<"cycle_title:"<<data._cycle_title <<std::endl; - os<<"cycle:"<<data._cycle.c_str()<<std::endl; + os<<"cycle:"<<data._cycle <<std::endl; - os<<"relative_orbit_title:"<<data._relative_orbit_title.c_str()<<std::endl; + os<<"relative_orbit_title:"<<data._relative_orbit_title <<std::endl; - os<<"rel_orbit:"<<data._rel_orbit.c_str()<<std::endl; + os<<"rel_orbit:"<<data._rel_orbit <<std::endl; - os<<"absolute_orbit_title:"<<data._absolute_orbit_title.c_str()<<std::endl; + os<<"absolute_orbit_title:"<<data._absolute_orbit_title <<std::endl; - os<<"abs_orbit:"<<data._abs_orbit.c_str()<<std::endl; + os<<"abs_orbit:"<<data._abs_orbit <<std::endl; - os<<"state_vector_time_title:"<<data._state_vector_time_title.c_str()<<std::endl; + os<<"state_vector_time_title:"<<data._state_vector_time_title <<std::endl; - os<<"state_vector_time:"<<data._state_vector_time.c_str()<<std::endl; + os<<"state_vector_time:"<<data._state_vector_time <<std::endl; - os<<"delta_ut1_title:"<<data._delta_ut1_title.c_str()<<std::endl; + os<<"delta_ut1_title:"<<data._delta_ut1_title <<std::endl; - os<<"delta_ut1:"<<data._delta_ut1.c_str()<<std::endl; + os<<"delta_ut1:"<<data._delta_ut1 <<std::endl; - os<<"delta_ut1_units:"<<data._delta_ut1_units.c_str()<<std::endl; + os<<"delta_ut1_units:"<<data._delta_ut1_units <<std::endl; - os<<"x_position_title:"<<data._x_position_title.c_str()<<std::endl; + os<<"x_position_title:"<<data._x_position_title <<std::endl; - os<<"x_position:"<<data._x_position.c_str()<<std::endl; + os<<"x_position:"<<data._x_position <<std::endl; - os<<"x_position_units:"<<data._x_position_units.c_str()<<std::endl; + os<<"x_position_units:"<<data._x_position_units <<std::endl; - os<<"y_position_title:"<<data._y_position_title.c_str()<<std::endl; + os<<"y_position_title:"<<data._y_position_title <<std::endl; - os<<"y_position:"<<data._y_position.c_str()<<std::endl; + os<<"y_position:"<<data._y_position <<std::endl; - os<<"y_position_units:"<<data._y_position_units.c_str()<<std::endl; + os<<"y_position_units:"<<data._y_position_units <<std::endl; - os<<"z_position_title:"<<data._z_position_title.c_str()<<std::endl; + os<<"z_position_title:"<<data._z_position_title <<std::endl; - os<<"z_position:"<<data._z_position.c_str()<<std::endl; + os<<"z_position:"<<data._z_position <<std::endl; - os<<"z_position_units:"<<data._z_position_units.c_str()<<std::endl; + os<<"z_position_units:"<<data._z_position_units <<std::endl; - os<<"x_velocity_title:"<<data._x_velocity_title.c_str()<<std::endl; + os<<"x_velocity_title:"<<data._x_velocity_title <<std::endl; - os<<"x_velocity:"<<data._x_velocity.c_str()<<std::endl; + os<<"x_velocity:"<<data._x_velocity <<std::endl; - os<<"x_velocity_units:"<<data._x_velocity_units.c_str()<<std::endl; + os<<"x_velocity_units:"<<data._x_velocity_units <<std::endl; - os<<"y_velocity_title:"<<data._y_velocity_title.c_str()<<std::endl; + os<<"y_velocity_title:"<<data._y_velocity_title <<std::endl; - os<<"y_velocity:"<<data._y_velocity.c_str()<<std::endl; + os<<"y_velocity:"<<data._y_velocity <<std::endl; - os<<"y_velocity_units:"<<data._y_velocity_units.c_str()<<std::endl; + os<<"y_velocity_units:"<<data._y_velocity_units <<std::endl; - os<<"z_velocity_title:"<<data._z_velocity_title.c_str()<<std::endl; + os<<"z_velocity_title:"<<data._z_velocity_title <<std::endl; - os<<"z_velocity:"<<data._z_velocity.c_str()<<std::endl; + os<<"z_velocity:"<<data._z_velocity <<std::endl; - os<<"z_velocity_units:"<<data._z_velocity_units.c_str()<<std::endl; + os<<"z_velocity_units:"<<data._z_velocity_units <<std::endl; - os<<"vector_source_title:"<<data._vector_source_title.c_str()<<std::endl; + os<<"vector_source_title:"<<data._vector_source_title <<std::endl; - os<<"vector_source:"<<data._vector_source.c_str()<<std::endl; + os<<"vector_source:"<<data._vector_source <<std::endl; - os<<"spare_4:"<<data._spare_4.c_str()<<std::endl; + os<<"spare_4:"<<data._spare_4 <<std::endl; - os<<"utc_sbt_time_title:"<<data._utc_sbt_time_title.c_str()<<std::endl; + os<<"utc_sbt_time_title:"<<data._utc_sbt_time_title <<std::endl; - os<<"utc_sbt_time:"<<data._utc_sbt_time.c_str()<<std::endl; + os<<"utc_sbt_time:"<<data._utc_sbt_time <<std::endl; - os<<"sat_binary_time_title:"<<data._sat_binary_time_title.c_str()<<std::endl; + os<<"sat_binary_time_title:"<<data._sat_binary_time_title <<std::endl; - os<<"sat_binary_time:"<<data._sat_binary_time.c_str()<<std::endl; + os<<"sat_binary_time:"<<data._sat_binary_time <<std::endl; - os<<"clock_step_title:"<<data._clock_step_title.c_str()<<std::endl; + os<<"clock_step_title:"<<data._clock_step_title <<std::endl; - os<<"clock_step:"<<data._clock_step.c_str()<<std::endl; + os<<"clock_step:"<<data._clock_step <<std::endl; - os<<"clock_step_units:"<<data._clock_step_units.c_str()<<std::endl; + os<<"clock_step_units:"<<data._clock_step_units <<std::endl; - os<<"leap_utc_title:"<<data._leap_utc_title.c_str()<<std::endl; + os<<"leap_utc_title:"<<data._leap_utc_title <<std::endl; - os<<"leap_utc:"<<data._leap_utc.c_str()<<std::endl; + os<<"leap_utc:"<<data._leap_utc <<std::endl; - os<<"leap_sign_title:"<<data._leap_sign_title.c_str()<<std::endl; + os<<"leap_sign_title:"<<data._leap_sign_title <<std::endl; - os<<"leap_sign:"<<data._leap_sign.c_str()<<std::endl; + os<<"leap_sign:"<<data._leap_sign <<std::endl; - os<<"leap_err_title:"<<data._leap_err_title.c_str()<<std::endl; + os<<"leap_err_title:"<<data._leap_err_title <<std::endl; - os<<"leap_err:"<<data._leap_err.c_str()<<std::endl; + os<<"leap_err:"<<data._leap_err <<std::endl; - os<<"product_err_title:"<<data._product_err_title.c_str()<<std::endl; + os<<"product_err_title:"<<data._product_err_title <<std::endl; - os<<"product_err:"<<data._product_err.c_str()<<std::endl; + os<<"product_err:"<<data._product_err <<std::endl; - os<<"total_size_title:"<<data._total_size_title.c_str()<<std::endl; + os<<"total_size_title:"<<data._total_size_title <<std::endl; - os<<"tot_size:"<<data._tot_size.c_str()<<std::endl; + os<<"tot_size:"<<data._tot_size <<std::endl; - os<<"total_size_units:"<<data._total_size_units.c_str()<<std::endl; + os<<"total_size_units:"<<data._total_size_units <<std::endl; - os<<"sph_size_title:"<<data._sph_size_title.c_str()<<std::endl; + os<<"sph_size_title:"<<data._sph_size_title <<std::endl; - os<<"sph_size:"<<data._sph_size.c_str()<<std::endl; + os<<"sph_size:"<<data._sph_size <<std::endl; - os<<"sph_size_units:"<<data._sph_size_units.c_str()<<std::endl; + os<<"sph_size_units:"<<data._sph_size_units <<std::endl; - os<<"number_of_dsd_title:"<<data._number_of_dsd_title.c_str()<<std::endl; + os<<"number_of_dsd_title:"<<data._number_of_dsd_title <<std::endl; os<<"num_dsd:"<<data._num_dsd<<std::endl; - os<<"size_of_dsd_title:"<<data._size_of_dsd_title.c_str()<<std::endl; + os<<"size_of_dsd_title:"<<data._size_of_dsd_title <<std::endl; os<<"dsd_size:"<<data._dsd_size<<std::endl; - os<<"size_of_dsd_units:"<<data._size_of_dsd_units.c_str()<<std::endl; + os<<"size_of_dsd_units:"<<data._size_of_dsd_units <<std::endl; - os<<"number_of_ds_att_title:"<<data._number_of_ds_att_title.c_str()<<std::endl; + os<<"number_of_ds_att_title:"<<data._number_of_ds_att_title <<std::endl; os<<"num_data_sets:"<<data._num_data_sets<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/sph.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/sph.cpp index 61ed424b7c5a5e7b548c5aedcf2171eb9c9cb0eb..d7d7e337beac7160230ed9c78219d8f9d56dbbed 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/sph.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/EnvisatAsar/sph.cpp @@ -47,165 +47,165 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const sph& data) { - os<<"sph_desc_title:"<<data._sph_desc_title.c_str()<<std::endl; + os<<"sph_desc_title:"<<data._sph_desc_title <<std::endl; - os<<"sph_desc:"<<data._sph_desc.c_str()<<std::endl; + os<<"sph_desc:"<<data._sph_desc <<std::endl; - os<<"strip_cont_ind_title:"<<data._strip_cont_ind_title.c_str()<<std::endl; + os<<"strip_cont_ind_title:"<<data._strip_cont_ind_title <<std::endl; - os<<"strip_cont_ind std::string:"<<data._strip_cont_ind.c_str()<<std::endl; + os<<"strip_cont_ind std::string:"<<data._strip_cont_ind <<std::endl; - os<<"slice_pos_title:"<<data._slice_pos_title.c_str()<<std::endl; + os<<"slice_pos_title:"<<data._slice_pos_title <<std::endl; - os<<"slice_position:"<<data._slice_position.c_str()<<std::endl; + os<<"slice_position:"<<data._slice_position <<std::endl; - os<<"num_slices_title:"<<data._num_slices_title.c_str()<<std::endl; + os<<"num_slices_title:"<<data._num_slices_title <<std::endl; - os<<"num_slices:"<<data._num_slices.c_str()<<std::endl; + os<<"num_slices:"<<data._num_slices <<std::endl; - os<<"first_line_time_title:"<<data._first_line_time_title.c_str()<<std::endl; + os<<"first_line_time_title:"<<data._first_line_time_title <<std::endl; - os<<"first_line_time:"<<data._first_line_time.c_str()<<std::endl; + os<<"first_line_time:"<<data._first_line_time <<std::endl; - os<<"last_line_time_title:"<<data._last_line_time_title.c_str()<<std::endl; + os<<"last_line_time_title:"<<data._last_line_time_title <<std::endl; - os<<"last_line_time:"<<data._last_line_time.c_str()<<std::endl; + os<<"last_line_time:"<<data._last_line_time <<std::endl; - os<<"first_near_lat_title:"<<data._first_near_lat_title.c_str()<<std::endl; + os<<"first_near_lat_title:"<<data._first_near_lat_title <<std::endl; - os<<"first_near_lat:"<<data._first_near_lat.c_str()<<std::endl; + os<<"first_near_lat:"<<data._first_near_lat <<std::endl; - os<<"first_near_lat_units:"<<data._first_near_lat_units.c_str()<<std::endl; + os<<"first_near_lat_units:"<<data._first_near_lat_units <<std::endl; - os<<"first_near_long_title:"<<data._first_near_long_title.c_str()<<std::endl; + os<<"first_near_long_title:"<<data._first_near_long_title <<std::endl; - os<<"first_near_long:"<<data._first_near_long.c_str()<<std::endl; + os<<"first_near_long:"<<data._first_near_long <<std::endl; - os<<"first_near_long_units:"<<data._first_near_long_units.c_str()<<std::endl; + os<<"first_near_long_units:"<<data._first_near_long_units <<std::endl; - os<<"first_mid_lat_title:"<<data._first_mid_lat_title.c_str()<<std::endl; + os<<"first_mid_lat_title:"<<data._first_mid_lat_title <<std::endl; - os<<"first_mid_lat:"<<data._first_mid_lat.c_str()<<std::endl; + os<<"first_mid_lat:"<<data._first_mid_lat <<std::endl; - os<<"first_mid_lat_units:"<<data._first_mid_lat_units.c_str()<<std::endl; + os<<"first_mid_lat_units:"<<data._first_mid_lat_units <<std::endl; - os<<"first_mid_long_title:"<<data._first_mid_long_title.c_str()<<std::endl; + os<<"first_mid_long_title:"<<data._first_mid_long_title <<std::endl; - os<<"first_mid_long:"<<data._first_mid_long.c_str()<<std::endl; + os<<"first_mid_long:"<<data._first_mid_long <<std::endl; - os<<"first_mid_long_units:"<<data._first_mid_long_units.c_str()<<std::endl; + os<<"first_mid_long_units:"<<data._first_mid_long_units <<std::endl; - os<<"first_far_lat_title:"<<data._first_far_lat_title.c_str()<<std::endl; + os<<"first_far_lat_title:"<<data._first_far_lat_title <<std::endl; - os<<"first_far_lat:"<<data._first_far_lat.c_str()<<std::endl; + os<<"first_far_lat:"<<data._first_far_lat <<std::endl; - os<<"first_far_lat_units:"<<data._first_far_lat_units.c_str()<<std::endl; + os<<"first_far_lat_units:"<<data._first_far_lat_units <<std::endl; - os<<"first_far_long_title:"<<data._first_far_long_title.c_str()<<std::endl; + os<<"first_far_long_title:"<<data._first_far_long_title <<std::endl; - os<<"first_far_long:"<<data._first_far_long.c_str()<<std::endl; + os<<"first_far_long:"<<data._first_far_long <<std::endl; - os<<"first_far_long_units:"<<data._first_far_long_units.c_str()<<std::endl; + os<<"first_far_long_units:"<<data._first_far_long_units <<std::endl; - os<<"last_near_lat_title:"<<data._last_near_lat_title.c_str()<<std::endl; + os<<"last_near_lat_title:"<<data._last_near_lat_title <<std::endl; - os<<"last_near_lat:"<<data._last_near_lat.c_str()<<std::endl; + os<<"last_near_lat:"<<data._last_near_lat <<std::endl; - os<<"last_near_lat_units:"<<data._last_near_lat_units.c_str()<<std::endl; + os<<"last_near_lat_units:"<<data._last_near_lat_units <<std::endl; - os<<"last_near_long_title:"<<data._last_near_long_title.c_str()<<std::endl; + os<<"last_near_long_title:"<<data._last_near_long_title <<std::endl; - os<<"last_near_long:"<<data._last_near_long.c_str()<<std::endl; + os<<"last_near_long:"<<data._last_near_long <<std::endl; - os<<"last_near_long_units:"<<data._last_near_long_units.c_str()<<std::endl; + os<<"last_near_long_units:"<<data._last_near_long_units <<std::endl; - os<<"last_mid_lat_title:"<<data._last_mid_lat_title.c_str()<<std::endl; + os<<"last_mid_lat_title:"<<data._last_mid_lat_title <<std::endl; - os<<"last_mid_lat:"<<data._last_mid_lat.c_str()<<std::endl; + os<<"last_mid_lat:"<<data._last_mid_lat <<std::endl; - os<<"last_mid_lat_units:"<<data._last_mid_lat_units.c_str()<<std::endl; + os<<"last_mid_lat_units:"<<data._last_mid_lat_units <<std::endl; - os<<"last_mid_long_title:"<<data._last_mid_long_title.c_str()<<std::endl; + os<<"last_mid_long_title:"<<data._last_mid_long_title <<std::endl; - os<<"last_mid_long:"<<data._last_mid_long.c_str()<<std::endl; + os<<"last_mid_long:"<<data._last_mid_long <<std::endl; - os<<"last_mid_long_units:"<<data._last_mid_long_units.c_str()<<std::endl; + os<<"last_mid_long_units:"<<data._last_mid_long_units <<std::endl; - os<<"last_far_lat_title:"<<data._last_far_lat_title.c_str()<<std::endl; + os<<"last_far_lat_title:"<<data._last_far_lat_title <<std::endl; - os<<"last_far_lat:"<<data._last_far_lat.c_str()<<std::endl; + os<<"last_far_lat:"<<data._last_far_lat <<std::endl; - os<<"last_far_lat_units:"<<data._last_far_lat_units.c_str()<<std::endl; + os<<"last_far_lat_units:"<<data._last_far_lat_units <<std::endl; - os<<"last_far_long_title:"<<data._last_far_long_title.c_str()<<std::endl; + os<<"last_far_long_title:"<<data._last_far_long_title <<std::endl; - os<<"last_far_long:"<<data._last_far_long.c_str()<<std::endl; + os<<"last_far_long:"<<data._last_far_long <<std::endl; - os<<"last_far_long_units:"<<data._last_far_long_units.c_str()<<std::endl; + os<<"last_far_long_units:"<<data._last_far_long_units <<std::endl; - os<<"swath_title:"<<data._swath_title.c_str()<<std::endl; + os<<"swath_title:"<<data._swath_title <<std::endl; - os<<"swath:"<<data._swath.c_str()<<std::endl; + os<<"swath:"<<data._swath <<std::endl; - os<<"pass_title:"<<data._pass_title.c_str()<<std::endl; + os<<"pass_title:"<<data._pass_title <<std::endl; - os<<"pass:"<<data._pass.c_str()<<std::endl; + os<<"pass:"<<data._pass <<std::endl; - os<<"sample_type_title:"<<data._sample_type_title.c_str()<<std::endl; + os<<"sample_type_title:"<<data._sample_type_title <<std::endl; - os<<"sample_type:"<<data._sample_type.c_str()<<std::endl; + os<<"sample_type:"<<data._sample_type <<std::endl; - os<<"algo_title:"<<data._algo_title.c_str()<<std::endl; + os<<"algo_title:"<<data._algo_title <<std::endl; - os<<"algorithm:"<<data._algorithm.c_str()<<std::endl; + os<<"algorithm:"<<data._algorithm <<std::endl; - os<<"mds1_tx_rx_polar_title:"<<data._mds1_tx_rx_polar_title.c_str()<<std::endl; + os<<"mds1_tx_rx_polar_title:"<<data._mds1_tx_rx_polar_title <<std::endl; - os<<"mds1_tx_rx_polar:"<<data._mds1_tx_rx_polar.c_str()<<std::endl; + os<<"mds1_tx_rx_polar:"<<data._mds1_tx_rx_polar <<std::endl; - os<<"mds2_tx_rx_polar_title:"<<data._mds2_tx_rx_polar_title.c_str()<<std::endl; + os<<"mds2_tx_rx_polar_title:"<<data._mds2_tx_rx_polar_title <<std::endl; - os<<"mds2_tx_rx_polar:"<<data._mds2_tx_rx_polar.c_str()<<std::endl; + os<<"mds2_tx_rx_polar:"<<data._mds2_tx_rx_polar <<std::endl; - os<<"compression_title:"<<data._compression_title.c_str()<<std::endl; + os<<"compression_title:"<<data._compression_title <<std::endl; - os<<"compression:"<<data._compression.c_str()<<std::endl; + os<<"compression:"<<data._compression <<std::endl; - os<<"azimut_looks_title:"<<data._azimut_looks_title.c_str()<<std::endl; + os<<"azimut_looks_title:"<<data._azimut_looks_title <<std::endl; - os<<"azimut_looks:"<<data._azimut_looks.c_str()<<std::endl; + os<<"azimut_looks:"<<data._azimut_looks <<std::endl; - os<<"range_looks_title:"<<data._range_looks_title.c_str()<<std::endl; + os<<"range_looks_title:"<<data._range_looks_title <<std::endl; - os<<"range_looks:"<<data._range_looks.c_str()<<std::endl; + os<<"range_looks:"<<data._range_looks <<std::endl; - os<<"range_spacing_title:"<<data._range_spacing_title.c_str()<<std::endl; + os<<"range_spacing_title:"<<data._range_spacing_title <<std::endl; - os<<"range_spacing:"<<data._range_spacing.c_str()<<std::endl; + os<<"range_spacing:"<<data._range_spacing <<std::endl; - os<<"range_spacing_unit:"<<data._range_spacing_unit.c_str()<<std::endl; + os<<"range_spacing_unit:"<<data._range_spacing_unit <<std::endl; - os<<"azimut_spacing_title:"<<data._azimut_spacing_title.c_str()<<std::endl; + os<<"azimut_spacing_title:"<<data._azimut_spacing_title <<std::endl; - os<<"azimut_spacing:"<<data._azimut_spacing.c_str()<<std::endl; + os<<"azimut_spacing:"<<data._azimut_spacing <<std::endl; - os<<"azimut_spacing_unit:"<<data._azimut_spacing_unit.c_str()<<std::endl; + os<<"azimut_spacing_unit:"<<data._azimut_spacing_unit <<std::endl; - os<<"line_time_interval_title:"<<data._line_time_interval_title.c_str()<<std::endl; + os<<"line_time_interval_title:"<<data._line_time_interval_title <<std::endl; - os<<"line_time_interval:"<<data._line_time_interval.c_str()<<std::endl; + os<<"line_time_interval:"<<data._line_time_interval <<std::endl; - os<<"line_time_interv_units:"<<data._line_time_interv_units.c_str()<<std::endl; + os<<"line_time_interv_units:"<<data._line_time_interv_units <<std::endl; - os<<"line_length_title:"<<data._line_length_title.c_str()<<std::endl; + os<<"line_length_title:"<<data._line_length_title <<std::endl; - os<<"line_length:"<<data._line_length.c_str()<<std::endl; + os<<"line_length:"<<data._line_length <<std::endl; - os<<"line_length_units:"<<data._line_length_units.c_str()<<std::endl; + os<<"line_length_units:"<<data._line_length_units <<std::endl; - os<<"data_type_title:"<<data._data_type_title.c_str()<<std::endl; + os<<"data_type_title:"<<data._data_type_title <<std::endl; - os<<"data_type:"<<data._data_type.c_str()<<std::endl; + os<<"data_type:"<<data._data_type <<std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamInformationRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamInformationRecord.cpp index 38aafe408201f011f2740e7e4e64ecb98c96746e..44b2f3bf461f14ae41cc28a85a5af6aa473749bb 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamInformationRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamInformationRecord.cpp @@ -37,9 +37,9 @@ BeamInformationRecord::~BeamInformationRecord() std::ostream& operator<<(std::ostream& os, const BeamInformationRecord& data) { - os<<"beam_type:"<<data._beam_type.c_str()<<std::endl; + os<<"beam_type:"<<data._beam_type <<std::endl; - os<<"beam_look_src:"<<data._beam_look_src.c_str()<<std::endl; + os<<"beam_look_src:"<<data._beam_look_src <<std::endl; os<<"beam_look_ang:"<<data._beam_look_ang<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamPixelCountRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamPixelCountRecord.cpp index 69db7205f86f15945ff18723192142f466e27588..466057fea439ce56e74e2d5b1ddc573e1772ec0b 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamPixelCountRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/BeamPixelCountRecord.cpp @@ -37,7 +37,7 @@ BeamPixelCountRecord::~BeamPixelCountRecord() std::ostream& operator<<(std::ostream& os, const BeamPixelCountRecord& data) { - os<<"pix_update:"<<data._pix_update.c_str()<<std::endl; + os<<"pix_update:"<<data._pix_update <<std::endl; for (int i=0;i<4;i++) { diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/CompensationDataRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/CompensationDataRecord.cpp index 428395e400b81f559b8add3fd3951bce9786ab66..e70f8ff0f89b260b63c6c4d313b9c5ef36ca6509 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/CompensationDataRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/CompensationDataRecord.cpp @@ -37,9 +37,9 @@ CompensationDataRecord::~CompensationDataRecord() std::ostream& operator<<(std::ostream& os, const CompensationDataRecord& data) { - os<<"comp_desig:"<<data._comp_desig.c_str()<<std::endl; + os<<"comp_desig:"<<data._comp_desig <<std::endl; - os<<"comp_descr:"<<data._comp_descr.c_str()<<std::endl; + os<<"comp_descr:"<<data._comp_descr <<std::endl; os<<"n_comp_rec:"<<data._n_comp_rec<<std::endl; @@ -52,7 +52,7 @@ std::ostream& operator<<(std::ostream& os, const CompensationDataRecord& data) os<<"beam_tab["<<i<<"]:"<<data._beam_tab[i]<<std::endl; } - os<<"beam_type:"<<data._beam_type.c_str()<<std::endl; + os<<"beam_type:"<<data._beam_type <<std::endl; os<<"look_angle:"<<data._look_angle<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataHistogramRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataHistogramRecord.cpp index 1d43b38a098f0b29132a77978b60abf5fb9e8907..bc27ce84e7755b49ae0d7450928bfbb6de62ad3c 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataHistogramRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataHistogramRecord.cpp @@ -95,7 +95,7 @@ DataHistogramRecord& DataHistogramRecord::operator=(const DataHistogramRecord& r std::ostream& operator<<(std::ostream& os, const DataHistogramRecord& data) { - os<<"hist_desc:"<<data._hist_desc.c_str()<<std::endl; + os<<"hist_desc:"<<data._hist_desc <<std::endl; os<<"nrec:"<<data._nrec<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataQuality.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataQuality.cpp index e1fb3b069e7d06a7360edbda99cbe11c02149231..583e381629d141a47192366b64147b37efc5766d 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataQuality.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataQuality.cpp @@ -40,9 +40,9 @@ std::ostream& operator<<(std::ostream& os, const DataQuality& data) os<<"rec_seq:"<<data._rec_seq<<std::endl; - os<<"sar_chn:"<<data._sar_chn.c_str()<<std::endl; + os<<"sar_chn:"<<data._sar_chn <<std::endl; - os<<"cali_date:"<<data._cali_date.c_str()<<std::endl; + os<<"cali_date:"<<data._cali_date <<std::endl; os<<"nchn:"<<data._nchn<<std::endl; @@ -96,7 +96,7 @@ std::ostream& operator<<(std::ostream& os, const DataQuality& data) os<<"enl:"<<data._enl<<std::endl; - os<<"tb_update:"<<data._tb_update.c_str()<<std::endl; + os<<"tb_update:"<<data._tb_update <<std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataSetSummary.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataSetSummary.cpp index 40934fa3125ea7572a4451910b39f5eae3151d16..e597d76cfe8562288cf643a66dc75ede0c6021ff 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataSetSummary.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/DataSetSummary.cpp @@ -41,13 +41,13 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"sar_chn:"<<data._sar_chn<<std::endl; - os<<"scene_id:"<<data._scene_id.c_str()<<std::endl; + os<<"scene_id:"<<data._scene_id <<std::endl; - os<<"scene_des:"<<data._scene_des.c_str()<<std::endl; + os<<"scene_des:"<<data._scene_des <<std::endl; - os<<"inp_sctim:"<<data._inp_sctim.c_str()<<std::endl; + os<<"inp_sctim:"<<data._inp_sctim <<std::endl; - os<<"asc_des:"<<data._asc_des.c_str()<<std::endl; + os<<"asc_des:"<<data._asc_des <<std::endl; os<<"pro_lat:"<<data._pro_lat<<std::endl; @@ -55,7 +55,7 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"pro_head:"<<data._pro_head<<std::endl; - os<<"ellip_des:"<<data._ellip_des.c_str()<<std::endl; + os<<"ellip_des:"<<data._ellip_des <<std::endl; os<<"ellip_maj:"<<data._ellip_maj<<std::endl; @@ -71,9 +71,9 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"scene_len:"<<data._scene_len<<std::endl; os<<"scene_wid:"<<data._scene_wid<<std::endl; os<<"nchn:"<<data._nchn<<std::endl; - os<<"mission_id:"<<data._mission_id.c_str()<<std::endl; - os<<"sensor_id:"<<data._sensor_id.c_str()<<std::endl; - os<<"orbit_num:"<<data._orbit_num.c_str()<<std::endl; + os<<"mission_id:"<<data._mission_id <<std::endl; + os<<"sensor_id:"<<data._sensor_id <<std::endl; + os<<"orbit_num:"<<data._orbit_num <<std::endl; os<<"plat_lat:"<<data._plat_lat<<std::endl; @@ -88,9 +88,9 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"wave_length:"<<data._wave_length<<std::endl; - os<<"motion_comp:"<<data._motion_comp.c_str()<<std::endl; + os<<"motion_comp:"<<data._motion_comp <<std::endl; - os<<"pulse_code:"<<data._pulse_code.c_str()<<std::endl; + os<<"pulse_code:"<<data._pulse_code <<std::endl; for (int i=0;i<5;i++) { @@ -110,9 +110,9 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"rng_length:"<<data._rng_length<<std::endl; - os<<"baseband_f:"<<data._baseband_f.c_str()<<std::endl; + os<<"baseband_f:"<<data._baseband_f <<std::endl; - os<<"rngcmp_f:"<<data._rngcmp_f.c_str()<<std::endl; + os<<"rngcmp_f:"<<data._rngcmp_f <<std::endl; os<<"gn_polar:"<<data._gn_polar <<std::endl; @@ -120,7 +120,7 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"chn_bits:"<<data._chn_bits<<std::endl; - os<<"quant_desc:"<<data._quant_desc.c_str()<<std::endl; + os<<"quant_desc:"<<data._quant_desc <<std::endl; os<<"i_bias:"<<data._i_bias<<std::endl; @@ -132,7 +132,7 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"mech_sight:"<<data._mech_sight<<std::endl; - os<<"echo_track:"<<data._echo_track.c_str()<<std::endl; + os<<"echo_track:"<<data._echo_track <<std::endl; os<<"fa:"<<data._fa<<std::endl; @@ -146,19 +146,19 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"sat_clkinc:"<<data._sat_clkinc<<std::endl; - os<<"fac_id:"<<data._fac_id.c_str()<<std::endl; + os<<"fac_id:"<<data._fac_id <<std::endl; - os<<"sys_id:"<<data._sys_id.c_str()<<std::endl; + os<<"sys_id:"<<data._sys_id <<std::endl; - os<<"ver_id:"<<data._ver_id.c_str()<<std::endl; + os<<"ver_id:"<<data._ver_id <<std::endl; - os<<"fac_code:"<<data._fac_code.c_str()<<std::endl; + os<<"fac_code:"<<data._fac_code <<std::endl; - os<<"lev_code:"<<data._lev_code.c_str()<<std::endl; + os<<"lev_code:"<<data._lev_code <<std::endl; - os<<"prod_type:"<<data._prod_type.c_str()<<std::endl; + os<<"prod_type:"<<data._prod_type <<std::endl; - os<<"algor_id:"<<data._algor_id.c_str()<<std::endl; + os<<"algor_id:"<<data._algor_id <<std::endl; os<<"n_azilok:"<<data._n_azilok<<std::endl; @@ -172,11 +172,11 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"bnd_rng:"<<data._bnd_rng<<std::endl; - os<<"azi_weight:"<<data._azi_weight.c_str()<<std::endl; + os<<"azi_weight:"<<data._azi_weight <<std::endl; - os<<"rng_weight:"<<data._rng_weight.c_str()<<std::endl; + os<<"rng_weight:"<<data._rng_weight <<std::endl; - os<<"data_inpsrc:"<<data._data_inpsrc.c_str()<<std::endl; + os<<"data_inpsrc:"<<data._data_inpsrc <<std::endl; os<<"rng_res:"<<data._rng_res<<std::endl; @@ -193,9 +193,9 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"crt_dopcen[1]:"<<data._crt_dopcen[1]<<std::endl; os<<"crt_dopcen[2]:"<<data._crt_dopcen[2]<<std::endl; - os<<"time_dir_pix:"<<data._time_dir_pix.c_str()<<std::endl; + os<<"time_dir_pix:"<<data._time_dir_pix <<std::endl; - os<<"time_dir_lin:"<<data._time_dir_lin.c_str()<<std::endl; + os<<"time_dir_lin:"<<data._time_dir_lin <<std::endl; os<<"alt_rate[0]:"<<data._alt_rate[0]<<std::endl; os<<"alt_rate[1]:"<<data._alt_rate[1]<<std::endl; @@ -205,17 +205,17 @@ std::ostream& operator<<(std::ostream& os, const DataSetSummary& data) os<<"crt_rate[1]:"<<data._crt_rate[1]<<std::endl; os<<"crt_rate[2]:"<<data._crt_rate[2]<<std::endl; - os<<"clutter_lock:"<<data._line_cont.c_str()<<std::endl; + os<<"clutter_lock:"<<data._line_cont <<std::endl; - os<<"clutter_lock:"<<data._clutter_lock.c_str()<<std::endl; + os<<"clutter_lock:"<<data._clutter_lock <<std::endl; - os<<"auto_focus:"<<data._auto_focus.c_str()<<std::endl; + os<<"auto_focus:"<<data._auto_focus <<std::endl; os<<"line_spacing:"<<data._line_spacing<<std::endl; os<<"pix_spacing:"<<data._pix_spacing<<std::endl; - os<<"rngcmp_desg:"<<data._rngcmp_desg.c_str()<<std::endl; + os<<"rngcmp_desg:"<<data._rngcmp_desg <<std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/FileDescriptor.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/FileDescriptor.cpp index 8e57d6df776beb9d4f66c3380eb2674633d79a77..780cfca1102747ce9d4e62c04fecb96d3f42b45a 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/FileDescriptor.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/FileDescriptor.cpp @@ -37,20 +37,20 @@ FileDescriptor::~FileDescriptor() std::ostream& operator<<(std::ostream& os, const FileDescriptor& data) { - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; - os<<"format_doc:"<<data._format_doc.c_str()<<std::endl; - os<<"format_ver:"<<data._format_ver.c_str()<<std::endl; - os<<"design_rev:"<<data._design_rev.c_str()<<std::endl; - os<<"software_id:"<<data._software_id.c_str()<<std::endl; + os<<"ascii_flag:"<<data._ascii_flag <<std::endl; + os<<"format_doc:"<<data._format_doc <<std::endl; + os<<"format_ver:"<<data._format_ver <<std::endl; + os<<"design_rev:"<<data._design_rev <<std::endl; + os<<"software_id:"<<data._software_id <<std::endl; os<<"file_num:"<<data._file_num<<std::endl; - os<<"file_name:"<<data._file_name.c_str()<<std::endl; - os<<"rec_seq:"<<data._rec_seq.c_str()<<std::endl; + os<<"file_name:"<<data._file_name <<std::endl; + os<<"rec_seq:"<<data._rec_seq <<std::endl; os<<"seq_loc:"<<data._seq_loc<<std::endl; os<<"seq_len:"<<data._seq_len<<std::endl; - os<<"rec_code:"<<data._rec_code.c_str()<<std::endl; + os<<"rec_code:"<<data._rec_code <<std::endl; os<<"code_loc:"<<data._code_loc<<std::endl; os<<"code_len:"<<data._code_len<<std::endl; - os<<"rec_len:"<<data._rec_len.c_str()<<std::endl; + os<<"rec_len:"<<data._rec_len <<std::endl; os<<"rlen_loc:"<<data._rlen_loc<<std::endl; os<<"rlen_len:"<<data._rlen_len<<std::endl; os<<"n_dataset:"<<data._n_dataset<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/ProcessingParameters.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/ProcessingParameters.cpp index 24b79aa43ed32b8e43629994602eefc59b53077f..d5212754b6e738cc3af779810d7c52bfed1192ca 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/ProcessingParameters.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/ProcessingParameters.cpp @@ -39,26 +39,26 @@ namespace ossimplugins { os<<"rec_seq:"<<data._rec_seq<<std::endl; - os<<"inp_media:"<<data._inp_media.c_str()<<std::endl; + os<<"inp_media:"<<data._inp_media <<std::endl; os<<"n_tape_id:"<<data._n_tape_id<<std::endl; for (int i=0;i<10;i++) { - os<<"tape_id["<<i<<"]:"<<data._tape_id[i].c_str()<<std::endl; + os<<"tape_id["<<i<<"]:"<<data._tape_id[i] <<std::endl; } - os<<"exp_ing_start:"<<data._exp_ing_start.c_str()<<std::endl; + os<<"exp_ing_start:"<<data._exp_ing_start <<std::endl; - os<<"exp_ing_stop:"<<data._exp_ing_stop.c_str()<<std::endl; + os<<"exp_ing_stop:"<<data._exp_ing_stop <<std::endl; - os<<"act_ing_start:"<<data._act_ing_start.c_str()<<std::endl; + os<<"act_ing_start:"<<data._act_ing_start <<std::endl; - os<<"act_ing_stop:"<<data._act_ing_stop.c_str()<<std::endl; + os<<"act_ing_stop:"<<data._act_ing_stop <<std::endl; - os<<"proc_start:"<<data._proc_start.c_str()<<std::endl; + os<<"proc_start:"<<data._proc_start <<std::endl; - os<<"proc_stop:"<<data._proc_stop.c_str()<<std::endl; + os<<"proc_stop:"<<data._proc_stop <<std::endl; for (int i=0;i<10;i++) { @@ -97,13 +97,13 @@ namespace ossimplugins os<<"rej_rec_type:"<<data._rej_rec_type<<std::endl; - os<<"sens_config:"<<data._sens_config.c_str()<<std::endl; + os<<"sens_config:"<<data._sens_config <<std::endl; - os<<"sens_orient:"<<data._sens_orient.c_str()<<std::endl; + os<<"sens_orient:"<<data._sens_orient <<std::endl; - os<<"sych_marker:"<<data._sych_marker.c_str()<<std::endl; + os<<"sych_marker:"<<data._sych_marker <<std::endl; - os<<"rng_ref_src:"<<data._rng_ref_src.c_str()<<std::endl; + os<<"rng_ref_src:"<<data._rng_ref_src <<std::endl; for (int i=0;i<4;i++) { @@ -128,7 +128,7 @@ namespace ossimplugins os<<"pulse_bandw:"<<data._pulse_bandw<<std::endl; - os<<"adc_samp_rate:"<<data._adc_samp_rate.c_str()<<std::endl; + os<<"adc_samp_rate:"<<data._adc_samp_rate <<std::endl; os<<"rep_agc_attn:"<<data._rep_agc_attn<<std::endl; @@ -136,13 +136,13 @@ namespace ossimplugins os<<"rep_energy_gn:"<<data._rep_energy_gn<<std::endl; - os<<"orb_data_src:"<<data._orb_data_src.c_str()<<std::endl; + os<<"orb_data_src:"<<data._orb_data_src <<std::endl; os<<"pulse_cnt_1:"<<data._pulse_cnt_1<<std::endl; os<<"pulse_cnt_2:"<<data._pulse_cnt_2<<std::endl; - os<<"beam_edge_rqd:"<<data._beam_edge_rqd.c_str()<<std::endl; + os<<"beam_edge_rqd:"<<data._beam_edge_rqd <<std::endl; os<<"beam_edge_conf:"<<data._beam_edge_conf<<std::endl; @@ -166,7 +166,7 @@ namespace ossimplugins os<<"pwin_end:"<<data._pwin_end<<std::endl; - os<<"recd_type:"<<data._recd_type.c_str()<<std::endl; + os<<"recd_type:"<<data._recd_type <<std::endl; os<<"temp_set_inc:"<<data._temp_set_inc<<std::endl; @@ -212,7 +212,7 @@ namespace ossimplugins os<<"eph_orb_data["<<i<<"]:"<<data._eph_orb_data[i]<<std::endl; } - os<<"appl_type:"<<data._appl_type.c_str()<<std::endl; + os<<"appl_type:"<<data._appl_type <<std::endl; for (int i=0;i<5;i++) { @@ -228,31 +228,31 @@ namespace ossimplugins os<<"pixel_spacing:"<<data._pixel_spacing<<std::endl; - os<<"gics_reqd:"<<data._gics_reqd.c_str()<<std::endl; + os<<"gics_reqd:"<<data._gics_reqd <<std::endl; - os<<"wo_number:"<<data._wo_number.c_str()<<std::endl; + os<<"wo_number:"<<data._wo_number <<std::endl; - os<<"wo_date:"<<data._wo_date.c_str()<<std::endl; + os<<"wo_date:"<<data._wo_date <<std::endl; - os<<"satellite_id:"<<data._satellite_id.c_str()<<std::endl; + os<<"satellite_id:"<<data._satellite_id <<std::endl; - os<<"user_id:"<<data._user_id.c_str()<<std::endl; + os<<"user_id:"<<data._user_id <<std::endl; - os<<"complete_msg:"<<data._complete_msg.c_str()<<std::endl; + os<<"complete_msg:"<<data._complete_msg <<std::endl; - os<<"scene_id:"<<data._scene_id.c_str()<<std::endl; + os<<"scene_id:"<<data._scene_id <<std::endl; - os<<"density_in:"<<data._density_in.c_str()<<std::endl; + os<<"density_in:"<<data._density_in <<std::endl; - os<<"media_id:"<<data._media_id.c_str()<<std::endl; + os<<"media_id:"<<data._media_id <<std::endl; os<<"angle_first:"<<data._angle_first<<std::endl; os<<"angle_last:"<<data._angle_last<<std::endl; - os<<"prod_type:"<<data._prod_type.c_str()<<std::endl; + os<<"prod_type:"<<data._prod_type <<std::endl; - os<<"map_system:"<<data._map_system.c_str()<<std::endl; + os<<"map_system:"<<data._map_system <<std::endl; os<<"centre_lat:"<<data._centre_lat<<std::endl; @@ -262,11 +262,11 @@ namespace ossimplugins os<<"span_y:"<<data._span_y<<std::endl; - os<<"apply_dtm:"<<data._apply_dtm.c_str()<<std::endl; + os<<"apply_dtm:"<<data._apply_dtm <<std::endl; - os<<"density_out:"<<data._density_out.c_str()<<std::endl; + os<<"density_out:"<<data._density_out <<std::endl; - os<<"state_time:"<<data._state_time.c_str()<<std::endl; + os<<"state_time:"<<data._state_time <<std::endl; os<<"num_state_vectors:"<<data._num_state_vectors<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/RadiometricData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/RadiometricData.cpp index 710aea5d4b876b692c26b51fc47851ddc1867a64..1f651e26dace15286949984bd5a4dd101d0fb334 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/RadiometricData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/RadiometricData.cpp @@ -44,13 +44,13 @@ std::ostream& operator<<(std::ostream& os, const RadiometricData& data) os<<"field_size:"<<data._field_size<<std::endl; - os<<"chan_ind:"<<data._chan_ind.c_str()<<std::endl; + os<<"chan_ind:"<<data._chan_ind <<std::endl; - os<<"table_desig:"<<data._table_desig.c_str()<<std::endl; + os<<"table_desig:"<<data._table_desig <<std::endl; os<<"n_samp:"<<data._n_samp<<std::endl; - os<<"samp_type:"<<data._samp_type.c_str()<<std::endl; + os<<"samp_type:"<<data._samp_type <<std::endl; os<<"samp_inc:"<<data._samp_inc<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/SRGRCoefficientSetRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/SRGRCoefficientSetRecord.cpp index 8d03ba097bb5a81bec84ab4bc63d7719a5174d19..5f0dd6b3f77e5cdbdd866c4727440974388d5857 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/SRGRCoefficientSetRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/CommonRecord/SRGRCoefficientSetRecord.cpp @@ -37,7 +37,7 @@ SRGRCoefficientSetRecord::~SRGRCoefficientSetRecord() std::ostream& operator<<(std::ostream& os, const SRGRCoefficientSetRecord& data) { - os<<"srgr_update:"<<data._srgr_update.c_str()<<std::endl; + os<<"srgr_update:"<<data._srgr_update <<std::endl; for (int i=0;i<6;i++) { os<<"srgr_coef["<<i<<"]:"<<data._srgr_coef[i]<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Data/ImageOptionsFileDescriptor.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Data/ImageOptionsFileDescriptor.cpp index 9b80d9676e495166e0d30a72a14f3ec7ac8f5361..e93a23016eea4bc7746861dc8199ca70d7c7eb4e 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Data/ImageOptionsFileDescriptor.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Data/ImageOptionsFileDescriptor.cpp @@ -41,33 +41,33 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const ImageOptionsFileDescriptor& data) { - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; + os<<"ascii_flag:"<<data._ascii_flag <<std::endl; - os<<"format_doc:"<<data._format_doc.c_str()<<std::endl; + os<<"format_doc:"<<data._format_doc <<std::endl; - os<<"format_rev:"<<data._format_rev.c_str()<<std::endl; + os<<"format_rev:"<<data._format_rev <<std::endl; - os<<"design_rev:"<<data._design_rev.c_str()<<std::endl; + os<<"design_rev:"<<data._design_rev <<std::endl; - os<<"software_id:"<<data._software_id.c_str()<<std::endl; + os<<"software_id:"<<data._software_id <<std::endl; os<<"file_num:"<<data._file_num<<std::endl; - os<<"file_name:"<<data._file_name.c_str()<<std::endl; + os<<"file_name:"<<data._file_name <<std::endl; - os<<"rec_seq:"<<data._rec_seq.c_str()<<std::endl; + os<<"rec_seq:"<<data._rec_seq <<std::endl; os<<"seq_loc:"<<data._seq_loc<<std::endl; os<<"seq_len:"<<data._seq_len<<std::endl; - os<<"rec_code:"<<data._rec_code.c_str()<<std::endl; + os<<"rec_code:"<<data._rec_code <<std::endl; os<<"code_loc:"<<data._code_loc<<std::endl; os<<"code_len:"<<data._code_len<<std::endl; - os<<"rec_len:"<<data._rec_len.c_str()<<std::endl; + os<<"rec_len:"<<data._rec_len <<std::endl; os<<"rlen_loc:"<<data._rlen_loc<<std::endl; @@ -83,7 +83,7 @@ namespace ossimplugins os<<"nbyte:"<<data._nbyte<<std::endl; - os<<"justify:"<<data._justify.c_str()<<std::endl; + os<<"justify:"<<data._justify <<std::endl; os<<"nchn:"<<data._nchn<<std::endl; @@ -99,7 +99,7 @@ namespace ossimplugins os<<"nbott:"<<data._nbott<<std::endl; - os<<"intleav:"<<data._intleav.c_str()<<std::endl; + os<<"intleav:"<<data._intleav <<std::endl; os<<"nrec_lin:"<<data._nrec_lin<<std::endl; @@ -111,29 +111,29 @@ namespace ossimplugins os<<"n_suffix:"<<data._n_suffix<<std::endl; - os<<"lin_loc:"<<data._lin_loc.c_str()<<std::endl; + os<<"lin_loc:"<<data._lin_loc <<std::endl; - os<<"chn_loc:"<<data._chn_loc.c_str()<<std::endl; + os<<"chn_loc:"<<data._chn_loc <<std::endl; - os<<"tim_loc:"<<data._tim_loc.c_str()<<std::endl; + os<<"tim_loc:"<<data._tim_loc <<std::endl; - os<<"left_loc:"<<data._left_loc.c_str()<<std::endl; + os<<"left_loc:"<<data._left_loc <<std::endl; - os<<"right_loc:"<<data._right_loc.c_str()<<std::endl; + os<<"right_loc:"<<data._right_loc <<std::endl; - os<<"pad_ind:"<<data._pad_ind.c_str()<<std::endl; + os<<"pad_ind:"<<data._pad_ind <<std::endl; - os<<"qual_loc:"<<data._qual_loc.c_str()<<std::endl; + os<<"qual_loc:"<<data._qual_loc <<std::endl; - os<<"cali_loc:"<<data._cali_loc.c_str()<<std::endl; + os<<"cali_loc:"<<data._cali_loc <<std::endl; - os<<"gain_loc:"<<data._gain_loc.c_str()<<std::endl; + os<<"gain_loc:"<<data._gain_loc <<std::endl; - os<<"bias_loc:"<<data._bias_loc.c_str()<<std::endl; + os<<"bias_loc:"<<data._bias_loc <<std::endl; - os<<"type_id:"<<data._type_id.c_str()<<std::endl; + os<<"type_id:"<<data._type_id <<std::endl; - os<<"type_code:"<<data._type_code.c_str()<<std::endl; + os<<"type_code:"<<data._type_code <<std::endl; os<<"left_fill:"<<data._left_fill<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Leader/PlatformPositionData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Leader/PlatformPositionData.cpp index ced89632346a4dd0440638572232719e9d95119c..49d4f6cfa47fbc0770b4c43d97cc2e96131d412b 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Leader/PlatformPositionData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/Leader/PlatformPositionData.cpp @@ -37,7 +37,7 @@ PlatformPositionData::~PlatformPositionData() std::ostream& operator<<(std::ostream& os, const PlatformPositionData& data) { - os<<"orbit_ele_desg:"<<data._orbit_ele_desg.c_str()<<std::endl; + os<<"orbit_ele_desg:"<<data._orbit_ele_desg <<std::endl; for(int i=0;i<6;i++) { @@ -58,7 +58,7 @@ std::ostream& operator<<(std::ostream& os, const PlatformPositionData& data) os<<"data_int:"<<data._data_int<<std::endl; - os<<"ref_coord:"<<data._ref_coord.c_str()<<std::endl; + os<<"ref_coord:"<<data._ref_coord <<std::endl; os<<"hr_angle:"<<data._hr_angle<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/FilePointerRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/FilePointerRecord.cpp index d85224b4e02a558b110b5c0c919abea5e0616942..da662e85d5a03696aefb706c87bb2bfb57ff1bdf 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/FilePointerRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/FilePointerRecord.cpp @@ -37,18 +37,18 @@ FilePointerRecord::~FilePointerRecord() std::ostream& operator<<(std::ostream& os, const FilePointerRecord& data) { - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; + os<<"ascii_flag:"<<data._ascii_flag <<std::endl; os<<"file_num:"<<data._file_num<<std::endl; - os<<"file_name:"<<data._file_name.c_str()<<std::endl; - os<<"file_class:"<<data._file_class.c_str()<<std::endl; - os<<"file_code:"<<data._file_code.c_str()<<std::endl; - os<<"data_type:"<<data._data_type.c_str()<<std::endl; - os<<"data_code:"<<data._data_code.c_str()<<std::endl; + os<<"file_name:"<<data._file_name <<std::endl; + os<<"file_class:"<<data._file_class <<std::endl; + os<<"file_code:"<<data._file_code <<std::endl; + os<<"data_type:"<<data._data_type <<std::endl; + os<<"data_code:"<<data._data_code <<std::endl; os<<"nrec:"<<data._nrec<<std::endl; os<<"first_len:"<<data._first_len<<std::endl; os<<"max_len:"<<data._max_len<<std::endl; - os<<"len_type:"<<data._len_type.c_str()<<std::endl; - os<<"len_code:"<<data._len_code.c_str()<<std::endl; + os<<"len_type:"<<data._len_type <<std::endl; + os<<"len_code:"<<data._len_code <<std::endl; os<<"first_phyvol:"<<data._first_phyvol<<std::endl; os<<"last_phyvol:"<<data._last_phyvol<<std::endl; os<<"first_rec:"<<data._first_rec<<std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/TextRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/TextRecord.cpp index de02984a376f6932e5bdf240e30d85eb974c5e1f..6ec4fabadc1113016429bbe7275096f37590b1c2 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/TextRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/TextRecord.cpp @@ -37,14 +37,14 @@ TextRecord::~TextRecord() std::ostream& operator<<(std::ostream& os, const TextRecord& data) { - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; - os<<"cont_flag:"<<data._cont_flag.c_str()<<std::endl; - os<<"product_type:"<<data._product_type.c_str()<<std::endl; - os<<"product_create:"<<data._product_create.c_str()<<std::endl; - os<<"phyvol_id:"<<data._phyvol_id.c_str()<<std::endl; - os<<"scene_id:"<<data._scene_id.c_str()<<std::endl; - os<<"scene_loc:"<<data._scene_loc.c_str()<<std::endl; - os<<"copyright_info:"<<data._copyright_info.c_str()<<std::endl; + os<<"ascii_flag:"<<data._ascii_flag <<std::endl; + os<<"cont_flag:"<<data._cont_flag <<std::endl; + os<<"product_type:"<<data._product_type <<std::endl; + os<<"product_create:"<<data._product_create <<std::endl; + os<<"phyvol_id:"<<data._phyvol_id <<std::endl; + os<<"scene_id:"<<data._scene_id <<std::endl; + os<<"scene_loc:"<<data._scene_loc <<std::endl; + os<<"copyright_info:"<<data._copyright_info <<std::endl; return os; } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/VolumeDescriptorRecord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/VolumeDescriptorRecord.cpp index 6d7e4741d1dcac2f0a97d78c5c9577fd099a4f94..7082972e0e5a177581c3f5cb95960348b74e4816 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/VolumeDescriptorRecord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/RadarSat/VolumeDir/VolumeDescriptorRecord.cpp @@ -37,14 +37,14 @@ VolumeDescriptorRecord::~VolumeDescriptorRecord() std::ostream& operator<<(std::ostream& os, const VolumeDescriptorRecord& data) { - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; - os<<"format_doc:"<<data._format_doc.c_str()<<std::endl; - os<<"format_ver:"<<data._format_ver.c_str()<<std::endl; - os<<"format_rev:"<<data._format_rev.c_str()<<std::endl; - os<<"software_id:"<<data._software_id.c_str()<<std::endl; - os<<"phyvol_id:"<<data._phyvol_id.c_str()<<std::endl; - os<<"logvol_id:"<<data._logvol_id.c_str()<<std::endl; - os<<"volset_id:"<<data._volset_id.c_str()<<std::endl; + os<<"ascii_flag:"<<data._ascii_flag <<std::endl; + os<<"format_doc:"<<data._format_doc <<std::endl; + os<<"format_ver:"<<data._format_ver <<std::endl; + os<<"format_rev:"<<data._format_rev <<std::endl; + os<<"software_id:"<<data._software_id <<std::endl; + os<<"phyvol_id:"<<data._phyvol_id <<std::endl; + os<<"logvol_id:"<<data._logvol_id <<std::endl; + os<<"volset_id:"<<data._volset_id <<std::endl; os<<"phyvol_cnt:"<<data._phyvol_cnt<<std::endl; os<<"first_phyvol:"<<data._first_phyvol<<std::endl; os<<"last_phyvol:"<<data._last_phyvol<<std::endl; @@ -52,14 +52,14 @@ std::ostream& operator<<(std::ostream& os, const VolumeDescriptorRecord& data) os<<"first_file:"<<data._first_file<<std::endl; os<<"volset_log:"<<data._volset_log<<std::endl; os<<"phyvol_log:"<<data._phyvol_log<<std::endl; - os<<"logvol_date:"<<data._logvol_date.c_str()<<std::endl; - os<<"logvol_time:"<<data._logvol_time.c_str()<<std::endl; - os<<"logvol_country:"<<data._logvol_country.c_str()<<std::endl; - os<<"logvol_agency:"<<data._logvol_agency.c_str()<<std::endl; - os<<"logvol_facility:"<<data._logvol_facility.c_str()<<std::endl; + os<<"logvol_date:"<<data._logvol_date <<std::endl; + os<<"logvol_time:"<<data._logvol_time <<std::endl; + os<<"logvol_country:"<<data._logvol_country <<std::endl; + os<<"logvol_agency:"<<data._logvol_agency <<std::endl; + os<<"logvol_facility:"<<data._logvol_facility <<std::endl; os<<"n_filepoint:"<<data._n_filepoint<<std::endl; os<<"n_voldir:"<<data._n_voldir<<std::endl; - os<<"product_id:"<<data._product_id.c_str()<<std::endl; + os<<"product_id:"<<data._product_id <<std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarDataSetSummary.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarDataSetSummary.cpp index f84b564a4524442368a904f36136b52fea07ac31..68ea24f27c20f4a11f77c8cee708dcb8c082a053 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarDataSetSummary.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarDataSetSummary.cpp @@ -42,13 +42,13 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "sar_chn:" << data._sar_chn << std::endl; - os << "scene_id:" << data._scene_id.c_str() << std::endl; + os << "scene_id:" << data._scene_id << std::endl; - os << "scene_des:" << data._scene_des.c_str() << std::endl; + os << "scene_des:" << data._scene_des << std::endl; - os << "inp_sctim:" << data._inp_sctim.c_str() << std::endl; + os << "inp_sctim:" << data._inp_sctim << std::endl; - os << "asc_des:" << data._asc_des.c_str() << std::endl; + os << "asc_des:" << data._asc_des << std::endl; os << "pro_lat:" << data._pro_lat << std::endl; @@ -56,7 +56,7 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "pro_head:" << data._pro_head << std::endl; - os << "ellip_des:" << data._ellip_des.c_str() << std::endl; + os << "ellip_des:" << data._ellip_des << std::endl; os << "ellip_maj:" << data._ellip_maj << std::endl; @@ -72,9 +72,9 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "scene_len:" << data._scene_len << std::endl; os << "scene_wid:" << data._scene_wid << std::endl; os << "nchn:" << data._nchn << std::endl; - os << "mission_id:" << data._mission_id.c_str() << std::endl; - os << "sensor_id:" << data._sensor_id.c_str() << std::endl; - os << "orbit_num:" << data._orbit_num.c_str() << std::endl; + os << "mission_id:" << data._mission_id << std::endl; + os << "sensor_id:" << data._sensor_id << std::endl; + os << "orbit_num:" << data._orbit_num << std::endl; os << "plat_lat:" << data._plat_lat << std::endl; @@ -89,9 +89,9 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "wave_length:" << data._wave_length << std::endl; - os << "motion_comp:" << data._motion_comp.c_str() << std::endl; + os << "motion_comp:" << data._motion_comp << std::endl; - os << "pulse_code:" << data._pulse_code.c_str() << std::endl; + os << "pulse_code:" << data._pulse_code << std::endl; for (int i = 0; i < 5; i++) { @@ -111,9 +111,9 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "rng_length:" << data._rng_length << std::endl; - os << "baseband_f:" << data._baseband_f.c_str() << std::endl; + os << "baseband_f:" << data._baseband_f << std::endl; - os << "rngcmp_f:" << data._rngcmp_f.c_str() << std::endl; + os << "rngcmp_f:" << data._rngcmp_f << std::endl; os << "gn_polar:" << data._gn_polar << std::endl; @@ -121,7 +121,7 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "chn_bits:" << data._chn_bits << std::endl; - os << "quant_desc:" << data._quant_desc.c_str() << std::endl; + os << "quant_desc:" << data._quant_desc << std::endl; os << "i_bias:" << data._i_bias << std::endl; @@ -133,21 +133,21 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "fa:" << data._fa << std::endl; - os << "sat_bintim:" << data._sat_bintim.c_str() << std::endl; + os << "sat_bintim:" << data._sat_bintim << std::endl; - os << "sat_clktim:" << data._sat_clktim.c_str() << std::endl; + os << "sat_clktim:" << data._sat_clktim << std::endl; - os << "sat_clkinc:" << data._sat_clkinc.c_str() << std::endl; + os << "sat_clkinc:" << data._sat_clkinc << std::endl; - os << "fac_id:" << data._fac_id.c_str() << std::endl; + os << "fac_id:" << data._fac_id << std::endl; - os << "sys_id:" << data._sys_id.c_str() << std::endl; + os << "sys_id:" << data._sys_id << std::endl; - os << "ver_id:" << data._ver_id.c_str() << std::endl; + os << "ver_id:" << data._ver_id << std::endl; - os << "prod_type:" << data._prod_type.c_str() << std::endl; + os << "prod_type:" << data._prod_type << std::endl; - os << "algor_id:" << data._algor_id.c_str() << std::endl; + os << "algor_id:" << data._algor_id << std::endl; os << "n_azilok:" << data._n_azilok << std::endl; @@ -161,11 +161,11 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "bnd_rng:" << data._bnd_rng << std::endl; - os << "azi_weight:" << data._azi_weight.c_str() << std::endl; + os << "azi_weight:" << data._azi_weight << std::endl; - os << "rng_weight:" << data._rng_weight.c_str() << std::endl; + os << "rng_weight:" << data._rng_weight << std::endl; - os << "data_inpsrc:" << data._data_inpsrc.c_str() << std::endl; + os << "data_inpsrc:" << data._data_inpsrc << std::endl; os << "rng_res:" << data._rng_res << std::endl; @@ -179,9 +179,9 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "crt_dopcen[1]:" << data._crt_dopcen[1] << std::endl; os << "crt_dopcen[2]:" << data._crt_dopcen[2] << std::endl; - os << "time_dir_pix:" << data._time_dir_pix.c_str() << std::endl; + os << "time_dir_pix:" << data._time_dir_pix << std::endl; - os << "time_dir_lin:" << data._time_dir_lin.c_str() << std::endl; + os << "time_dir_lin:" << data._time_dir_lin << std::endl; os << "alt_rate[0]:" << data._alt_rate[0] << std::endl; os << "alt_rate[1]:" << data._alt_rate[1] << std::endl; @@ -191,17 +191,17 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "crt_rate[1]:" << data._crt_rate[1] << std::endl; os << "crt_rate[2]:" << data._crt_rate[2] << std::endl; - os << "clutter_lock:" << data._line_cont.c_str() << std::endl; + os << "clutter_lock:" << data._line_cont << std::endl; - os << "clutter_lock:" << data._clutter_lock.c_str() << std::endl; + os << "clutter_lock:" << data._clutter_lock << std::endl; - os << "auto_focus:" << data._auto_focus.c_str() << std::endl; + os << "auto_focus:" << data._auto_focus << std::endl; os << "line_spacing:" << data._line_spacing << std::endl; os << "pix_spacing:" << data._pix_spacing << std::endl; - os << "rngcmp_desg:" << data._rngcmp_desg.c_str() << std::endl; + os << "rngcmp_desg:" << data._rngcmp_desg << std::endl; os << "zero_dop_range_time_f_pixel:" << data._zero_dop_range_time_f_pixel << std::endl; @@ -209,11 +209,11 @@ std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) os << "zero_dop_range_time_l_pixel:" << data._zero_dop_range_time_l_pixel << std::endl; - os << "zero_dop_az_time_f_pixel :" << data._zero_dop_az_time_f_pixel.c_str() << std::endl; + os << "zero_dop_az_time_f_pixel :" << data._zero_dop_az_time_f_pixel << std::endl; - os << " zero_dop_az_time_c_pixel:" << data._zero_dop_az_time_c_pixel.c_str() << std::endl; + os << " zero_dop_az_time_c_pixel:" << data._zero_dop_az_time_c_pixel << std::endl; - os << " zero_dop_az_time_l_pixel:" << data._zero_dop_az_time_l_pixel.c_str() << std::endl; + os << " zero_dop_az_time_l_pixel:" << data._zero_dop_az_time_l_pixel << std::endl; return os; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFacilityData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFacilityData.cpp index f208c9f823f1903ceb20238a45d7196f4bcf22ed..980ef1785b50083d221d7a168058609814975400 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFacilityData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFacilityData.cpp @@ -38,9 +38,9 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const ErsSarFacilityData& data) { - os << "last_release_qc_date:" << data._last_release_qc_date.c_str() << std::endl; + os << "last_release_qc_date:" << data._last_release_qc_date << std::endl; - os << "last_release_cal_date:" << data._last_release_cal_date.c_str() << std::endl; + os << "last_release_cal_date:" << data._last_release_cal_date << std::endl; os << "qa_summary_flag:" << data._qa_summary_flag << std::endl; @@ -146,9 +146,9 @@ namespace ossimplugins os << "proc_noise_scale_fact:" << data._proc_noise_scale_fact << std::endl; - os << "K_gen_date:" << data._K_gen_date.c_str() << std::endl; + os << "K_gen_date:" << data._K_gen_date << std::endl; - os << "K_vers_num:" << data._K_vers_num.c_str() << std::endl; + os << "K_vers_num:" << data._K_vers_num << std::endl; os << "num_duplic_input_lines:" << data._num_duplic_input_lines << std::endl; @@ -160,21 +160,21 @@ namespace ossimplugins os << "out_image_max_value:" << data._out_image_max_value << std::endl; - os << "time_raw_data_first_input:" << data._time_raw_data_first_input.c_str() << std::endl; + os << "time_raw_data_first_input:" << data._time_raw_data_first_input << std::endl; - os << "time_asc_node_state_vectors:" << data._time_asc_node_state_vectors.c_str() << std::endl; + os << "time_asc_node_state_vectors:" << data._time_asc_node_state_vectors << std::endl; - os << "asc_node_pos_X_comp:" << data._asc_node_pos_X_comp.c_str() << std::endl; + os << "asc_node_pos_X_comp:" << data._asc_node_pos_X_comp << std::endl; - os << "asc_node_pos_Y_comp:" << data._asc_node_pos_Y_comp.c_str() << std::endl; + os << "asc_node_pos_Y_comp:" << data._asc_node_pos_Y_comp << std::endl; - os << "asc_node_pos_Z_comp:" << data._asc_node_pos_Z_comp.c_str() << std::endl; + os << "asc_node_pos_Z_comp:" << data._asc_node_pos_Z_comp << std::endl; - os << "asc_node_vel_X_comp:" << data._asc_node_vel_X_comp.c_str() << std::endl; + os << "asc_node_vel_X_comp:" << data._asc_node_vel_X_comp << std::endl; - os << "asc_node_vel_Y_comp:" << data._asc_node_vel_Y_comp.c_str() << std::endl; + os << "asc_node_vel_Y_comp:" << data._asc_node_vel_Y_comp << std::endl; - os << "asc_node_vel_Z_comp:" << data._asc_node_vel_Z_comp.c_str() << std::endl; + os << "asc_node_vel_Z_comp:" << data._asc_node_vel_Z_comp << std::endl; os << "out_pixel_bit_length:" << data._out_pixel_bit_length << std::endl; @@ -208,19 +208,19 @@ namespace ossimplugins os << "range_lines_skip_factor:" << data._range_lines_skip_factor << std::endl; - os << "time_of_inp_state_vectors:" << data._time_of_inp_state_vectors.c_str() << std::endl; + os << "time_of_inp_state_vectors:" << data._time_of_inp_state_vectors << std::endl; - os << "inp_state_vect_pos_X_comp:" << data._inp_state_vect_pos_X_comp.c_str() << std::endl; + os << "inp_state_vect_pos_X_comp:" << data._inp_state_vect_pos_X_comp << std::endl; - os << "inp_state_vect_pos_Y_comp:" << data._inp_state_vect_pos_Y_comp.c_str() << std::endl; + os << "inp_state_vect_pos_Y_comp:" << data._inp_state_vect_pos_Y_comp << std::endl; - os << "inp_state_vect_pos_Z_comp:" << data._inp_state_vect_pos_Z_comp.c_str() << std::endl; + os << "inp_state_vect_pos_Z_comp:" << data._inp_state_vect_pos_Z_comp << std::endl; - os << "inp_state_vect_vel_Vx_comp:" << data._inp_state_vect_vel_Vx_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vx_comp:" << data._inp_state_vect_vel_Vx_comp << std::endl; - os << "inp_state_vect_vel_Vy_comp:" << data._inp_state_vect_vel_Vy_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vy_comp:" << data._inp_state_vect_vel_Vy_comp << std::endl; - os << "inp_state_vect_vel_Vz_comp:" << data._inp_state_vect_vel_Vz_comp.c_str() << std::endl; + os << "inp_state_vect_vel_Vz_comp:" << data._inp_state_vect_vel_Vz_comp << std::endl; os << "inp_state_vector_type_flag:" << data._inp_state_vector_type_flag << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFileDescriptor.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFileDescriptor.cpp index 522ce8137b8fcca83f2f90e55a9e9f194e6ba0b1..09ddc18618cb150cba2bda7406564be62f24fc60 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFileDescriptor.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarFileDescriptor.cpp @@ -39,20 +39,20 @@ ErsSarFileDescriptor::~ErsSarFileDescriptor() std::ostream& operator<<(std::ostream& os, const ErsSarFileDescriptor& data) { - os << "ascii_flag:" << data._ascii_flag.c_str() << std::endl; - os << "format_doc:" << data._format_doc.c_str() << std::endl; - os << "format_ver:" << data._format_ver.c_str() << std::endl; - os << "design_rev:" << data._design_rev.c_str() << std::endl; - os << "software_id:" << data._software_id.c_str() << std::endl; + os << "ascii_flag:" << data._ascii_flag << std::endl; + os << "format_doc:" << data._format_doc << std::endl; + os << "format_ver:" << data._format_ver << std::endl; + os << "design_rev:" << data._design_rev << std::endl; + os << "software_id:" << data._software_id << std::endl; os << "file_num:" << data._file_num << std::endl; - os << "file_name:" << data._file_name.c_str() << std::endl; - os << "rec_seq:" << data._rec_seq.c_str() << std::endl; + os << "file_name:" << data._file_name << std::endl; + os << "rec_seq:" << data._rec_seq << std::endl; os << "seq_loc:" << data._seq_loc << std::endl; os << "seq_len:" << data._seq_len << std::endl; - os << "rec_code:" << data._rec_code.c_str() << std::endl; + os << "rec_code:" << data._rec_code << std::endl; os << "code_loc:" << data._code_loc << std::endl; os << "code_len:" << data._code_len << std::endl; - os << "rec_len:" << data._rec_len.c_str() << std::endl; + os << "rec_len:" << data._rec_len << std::endl; os << "rlen_loc:" << data._rlen_loc << std::endl; os << "rlen_len:" << data._rlen_len << std::endl; os << "n_dataset:" << data._n_dataset << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarMapProjectionData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarMapProjectionData.cpp index 0595ef44e0d3c7725cbcfd349e677294f754f114..a315ed4d686e36106822b1bb8a7eaa9024a10a64 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarMapProjectionData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarMapProjectionData.cpp @@ -38,7 +38,7 @@ namespace ossimplugins std::ostream& operator<<(std::ostream& os, const ErsSarMapProjectionData& data) { - os << "map_proj_des:" << data._map_proj_des.c_str() << std::endl; + os << "map_proj_des:" << data._map_proj_des << std::endl; os << "num_pix_in_line:" << data._num_pix_in_line << std::endl; @@ -56,7 +56,7 @@ namespace ossimplugins os << "platform_heading:" << data._platform_heading << std::endl; - os << "name_of_ref_ellipsoid:" << data._name_of_ref_ellipsoid.c_str() << std::endl; + os << "name_of_ref_ellipsoid:" << data._name_of_ref_ellipsoid << std::endl; os << "semi_maj_axis:" << data._semi_maj_axis << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarPlatformPositionData.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarPlatformPositionData.cpp index aa133ae49f5ff6de448257803b0ff57c65968a2b..ff60f001be94972e80a5705bfdcff82502c351f3 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarPlatformPositionData.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/erssar/ErsSarPlatformPositionData.cpp @@ -39,7 +39,7 @@ ErsSarPlatformPositionData::~ErsSarPlatformPositionData() std::ostream& operator<<(std::ostream& os, const ErsSarPlatformPositionData& data) { - os << "orbit_ele_desg:" << data._orbit_ele_desg.c_str() << std::endl; + os << "orbit_ele_desg:" << data._orbit_ele_desg << std::endl; for (int i = 0; i < 6; i++) { @@ -60,7 +60,7 @@ std::ostream& operator<<(std::ostream& os, const ErsSarPlatformPositionData& dat os << "data_int:" << data._data_int << std::endl; - os << "ref_coord:" << data._ref_coord.c_str() << std::endl; + os << "ref_coord:" << data._ref_coord << std::endl; os << "hr_angle:" << data._hr_angle << std::endl; diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTerraSarModel.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTerraSarModel.cpp index 0b599285ba306a87c71e00a4a5648e753f3d32a5..e52dff37c3e096223ef99ff8f55809a360e862a5 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTerraSarModel.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTerraSarModel.cpp @@ -887,7 +887,7 @@ std::ostream& ossimplugins::ossimTerraSarModel::print(std::ostream& out) const << ALT_SR_GR_COEFFICIENT0_KW << ": " << _alt_srgr_coefset[0] << "\n" << ALT_SR_GR_COEFFICIENT1_KW << ": " <<_alt_srgr_coefset[1] << "\n" << ALT_SR_GR_COEFFICIENT2_KW << ": " <<_alt_srgr_coefset[2] << "\n" - << PRODUCT_XML_FILE_KW << ": " << _productXmlFile.c_str() << "\n"; + << PRODUCT_XML_FILE_KW << ": " << _productXmlFile << "\n"; ossimGeometricSarSensorModel::print(out); for(ossim_uint32 i = 0; i < _numberOfLayers; ++i) @@ -929,17 +929,17 @@ std::ostream& ossimplugins::ossimTerraSarModel::print(std::ostream& out) const ossimString kw = ACQUISITION_INFO; ossimString kw2 = kw + IMAGING_MODE; - out << kw2 << ": " << _imagingMode.c_str()<< "\n"; + out << kw2 << ": " << _imagingMode << "\n"; kw2 = kw + SENSOR; - out << kw2<< ": " << _acquisitionSensor.c_str()<< "\n"; + out << kw2<< ": " << _acquisitionSensor << "\n"; kw2 = kw + LOOK_DIRECTION; - out << kw2<< ": " << _lookDirection.c_str()<< "\n"; + out << kw2<< ": " << _lookDirection << "\n"; kw2 = kw + POLARISATION_MODE; - out << kw2<< ": " << _polarisationMode.c_str()<< "\n"; + out << kw2<< ": " << _polarisationMode << "\n"; /* kw2 = kw + POLARISATION_LIST; for(ossim_uint32 i = 0; i < _numberOfLayers; ++i) { - out << kw2 << "["<< i <<"] : " << _polLayer[i].c_str()<< "\n"; + out << kw2 << "["<< i <<"] : " << _polLayer[i] << "\n"; if ( _noise[i]->print(out) == false ) { if (traceDebug()) diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/ImageNoise.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/ImageNoise.cpp index 42ce8dfd6ed98467468e71a0cba9adae621d45c5..be92baad0494c7dc026232bcc748e9c6bb7241ee 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/ImageNoise.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/ImageNoise.cpp @@ -130,7 +130,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << UTC_TIME << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << UTC_TIME << " in "<<pfx <<" path.\n"; result = false; } pfx2 = pfx + NOISE_ESTIMATE; @@ -143,7 +143,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << VALIDITY_RANGE_MIN << " in "<<pfx2.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << VALIDITY_RANGE_MIN << " in "<<pfx2 <<" path.\n"; result = false; } lookup = kwl.find(pfx2.c_str(), VALIDITY_RANGE_MAX); @@ -155,7 +155,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << VALIDITY_RANGE_MAX << " in "<<pfx2.c_str()<<" path\n"; + << MODULE << " Keyword not found: " << VALIDITY_RANGE_MAX << " in "<<pfx2 <<" path\n"; result = false; } lookup = kwl.find(pfx2.c_str(), REFERENCE_POINT); @@ -167,7 +167,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << REFERENCE_POINT << " in "<<pfx2.c_str()<<" path\n"; + << MODULE << " Keyword not found: " << REFERENCE_POINT << " in "<<pfx2 <<" path\n"; result = false; } lookup = kwl.find(pfx2.c_str(), POLYNOMIAL_DEGREE); @@ -179,7 +179,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << POLYNOMIAL_DEGREE << " in "<<pfx2.c_str()<<" path\n"; + << MODULE << " Keyword not found: " << POLYNOMIAL_DEGREE << " in "<<pfx2 <<" path\n"; result = false; } @@ -196,7 +196,7 @@ bool ImageNoise::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << kw.c_str() << " in "<<pfx2.c_str()<<" path\n"; + << MODULE << " Keyword not found: " << kw << " in "<<pfx2.c_str()<<" path\n"; result = false; } } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/IncidenceAngles.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/IncidenceAngles.cpp index b1d84a8b4148d2638fe48eeebb978edaef9627b0..52963493bcdbab24d451273b95ca672b64687d01 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/IncidenceAngles.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/IncidenceAngles.cpp @@ -119,7 +119,7 @@ bool IncidenceAngles::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << NUMBER_OF_CORNER_INCIDENCE_ANGLES << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << NUMBER_OF_CORNER_INCIDENCE_ANGLES << " in "<<pfx <<" path.\n"; result = false; } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoIncidenceAngle.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoIncidenceAngle.cpp index bfc7ed037b69a6aa5f69ae40124ad4bae173f179..20db85e7234d4aa3aec37614f256eea3dde3b1d7 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoIncidenceAngle.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoIncidenceAngle.cpp @@ -102,7 +102,7 @@ bool InfoIncidenceAngle::loadState(const ossimKeywordlist& kwl, const char* pref else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << REF_ROW << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << REF_ROW << " in "<<pfx <<" path.\n"; result = false; } @@ -115,7 +115,7 @@ bool InfoIncidenceAngle::loadState(const ossimKeywordlist& kwl, const char* pref else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << REF_COLUMN << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << REF_COLUMN << " in "<<pfx <<" path.\n"; result = false; } @@ -128,7 +128,7 @@ bool InfoIncidenceAngle::loadState(const ossimKeywordlist& kwl, const char* pref else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << INCIDENCE_ANGLE << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << INCIDENCE_ANGLE << " in "<<pfx <<" path.\n"; result = false; } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoSceneCoord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoSceneCoord.cpp index 3b9703ff05ba1e4439439b72b0605ad5295c2b9f..4c48e18ff35f65808d246cc1ff28ae1b12908345 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoSceneCoord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/InfoSceneCoord.cpp @@ -122,7 +122,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << REF_ROW << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << REF_ROW << " in "<<pfx <<" path.\n"; result = false; } @@ -135,7 +135,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << REF_COLUMN << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << REF_COLUMN << " in "<<pfx <<" path.\n"; result = false; } @@ -148,7 +148,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << LAT << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << LAT << " in "<<pfx <<" path.\n"; result = false; } @@ -161,7 +161,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << LON << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << LON << " in "<<pfx <<" path.\n"; result = false; } @@ -174,7 +174,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << AZIMUTH_TIME << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << AZIMUTH_TIME << " in "<<pfx <<" path.\n"; result = false; } @@ -187,7 +187,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << RANGE_TIME << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << RANGE_TIME << " in "<<pfx <<" path.\n"; result = false; } @@ -200,7 +200,7 @@ bool InfoSceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << INCIDENCE_ANGLE << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << INCIDENCE_ANGLE << " in "<<pfx <<" path.\n"; result = false; } diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/SceneCoord.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/SceneCoord.cpp index ed7927b49b4160813a342b042fb92b760bcd2da7..13813a650c53ec67fed6ebcfc4790e3a0cccc7cb 100644 --- a/Modules/ThirdParty/OssimPlugins/src/ossim/otb/SceneCoord.cpp +++ b/Modules/ThirdParty/OssimPlugins/src/ossim/otb/SceneCoord.cpp @@ -123,7 +123,7 @@ bool SceneCoord::loadState(const ossimKeywordlist& kwl, const char* prefix) else { ossimNotify(ossimNotifyLevel_WARN) - << MODULE << " Keyword not found: " << NUMBER_OF_SCENE_CORNER_COORD << " in "<<pfx.c_str()<<" path.\n"; + << MODULE << " Keyword not found: " << NUMBER_OF_SCENE_CORNER_COORD << " in "<<pfx <<" path.\n"; result = false; } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx b/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx index 5fc5b3669d63295a3ce1891193bf5f4b79706354..c779341f55d0f1237613ddb675262ad1302de5a1 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx @@ -712,7 +712,7 @@ ImageViewRenderer // // qDebug() // << "alpha:" << settings.GetAlpha() - // << "'" << it->first.c_str() << "'"; + // << "'" << it->first << "'"; imageSettings->SetAlpha( settings.GetAlpha() ); // diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationHtmlDocGenerator.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationHtmlDocGenerator.cxx index 3e35f46436972f645c57e0bbc2a9d014775d4e51..61aa72937782ca65e209303a85a559117eb54bc4 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationHtmlDocGenerator.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationHtmlDocGenerator.cxx @@ -163,7 +163,7 @@ ApplicationHtmlDocGenerator::GenerateDoc(const Application::Pointer app, const s ApplicationHtmlDocGenerator::GenerateDoc( app, doc, showKey ); - std::ofstream ofs(filename.c_str()); + std::ofstream ofs(filename); if (!ofs.is_open()) { fprintf(stderr, "Error, can't open file"); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx index e5a60bad3610b1601943999b50abb2dbb35bd44a..f2c43239466bb01c4319aa48b80197c4da7ff67c 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx @@ -144,7 +144,7 @@ ApplicationRegistry::SetApplicationPath(std::string newpath) putEnvPath << OTB_APPLICATION_VAR << "=" << newpath; // do NOT use putenv() directly, since the string memory must be managed carefully - itksys::SystemTools::PutEnv(putEnvPath.str().c_str()); + itksys::SystemTools::PutEnv(putEnvPath.str()); } void @@ -170,7 +170,7 @@ ApplicationRegistry::AddApplicationPath(std::string newpath) } // do NOT use putenv() directly, since the string memory must be managed carefully - itksys::SystemTools::PutEnv(putEnvPath.str().c_str()); + itksys::SystemTools::PutEnv(putEnvPath.str()); } std::string @@ -247,7 +247,7 @@ ApplicationRegistry::CreateApplicationFaster(const std::string& name) std::vector<itksys::String> pathList; if (!otbAppPath.empty()) { - pathList = itksys::SystemTools::SplitString(otbAppPath.c_str(),pathSeparator,false); + pathList = itksys::SystemTools::SplitString(otbAppPath,pathSeparator,false); } for (unsigned int i=0 ; i<pathList.size() ; ++i) { @@ -296,7 +296,7 @@ ApplicationRegistry::GetAvailableApplications(bool useFactory) std::vector<itksys::String> pathList; if (!otbAppPath.empty()) { - pathList = itksys::SystemTools::SplitString(otbAppPath.c_str(),pathSeparator,false); + pathList = itksys::SystemTools::SplitString(otbAppPath,pathSeparator,false); } for (unsigned int k=0 ; k<pathList.size() ; ++k) { @@ -365,7 +365,7 @@ ApplicationRegistry::LoadApplicationFromPath(std::string path,std::string name) { Application::Pointer appli; - if (itksys::SystemTools::FileExists(path.c_str(),true)) + if (itksys::SystemTools::FileExists(path,true)) { #if defined(_WIN32) && !defined(__CYGWIN__) int cp = CP_UTF8; diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx index b2d5d37c627e8dcdf17d1b663f2b96eb8408f870..11f0e6b482a69896a0d132edb64bcc808c49576f 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx @@ -69,7 +69,7 @@ InputProcessXMLParameter::SetFileName(std::string value) // Check that the right extension is given : expected .xml if (itksys::SystemTools::GetFilenameLastExtension(value) == ".xml") { - if (itksys::SystemTools::FileExists(value.c_str(),true)) + if (itksys::SystemTools::FileExists(value,true)) { this->SetValue(value); return true; @@ -187,7 +187,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) //Use itksys::SystemTools::FOpen() and close it below because //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even //though its available in the TiXmlDocument::SaveFile(). - FILE* fp = itksys::SystemTools::Fopen(m_FileName.c_str(), "rb"); + FILE* fp = itksys::SystemTools::Fopen(m_FileName, "rb"); if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8)) { @@ -354,7 +354,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) } else if (type == ParameterType_InputImage) { - if(itksys::SystemTools::FileExists(value.c_str())) + if(itksys::SystemTools::FileExists(value)) { InputImageParameter* paramDown = dynamic_cast<InputImageParameter*>(param); if(paramDown!=nullptr) @@ -373,7 +373,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) } else if (type == ParameterType_ComplexInputImage) { - if(itksys::SystemTools::FileExists(value.c_str())) + if(itksys::SystemTools::FileExists(value)) { ComplexInputImageParameter* paramDown = dynamic_cast<ComplexInputImageParameter*>(param); if(paramDown!=nullptr) @@ -382,7 +382,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) } else if (dynamic_cast<InputVectorDataParameter*>(param)) { - if(itksys::SystemTools::FileExists(value.c_str())) + if(itksys::SystemTools::FileExists(value)) { InputVectorDataParameter* paramDown = dynamic_cast<InputVectorDataParameter*>(param); if ( !paramDown->SetFromFileName(value) ) diff --git a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx index 84be8cd5e5b44a142b454204aeb728a074dda35d..a7618818242cf2f1ca3896ad9bf346b5f98afe52 100644 --- a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx +++ b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx @@ -52,7 +52,7 @@ std::string PrepareExpressionFromXML(std::string filename) //Use itksys::SystemTools::FOpen() and close it below because //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even //though its available in the TiXmlDocument::SaveFile(). - FILE* fp = itksys::SystemTools::Fopen(filename.c_str(), "rb"); + FILE* fp = itksys::SystemTools::Fopen(filename, "rb"); if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8)) { @@ -174,7 +174,7 @@ std::vector<std::string> PrepareVectorExpressionFromXML(std::string filename) //Use itksys::SystemTools::FOpen() and close it below because //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even //though its available in the TiXmlDocument::SaveFile(). - FILE* fp = itksys::SystemTools::Fopen(filename.c_str(), "rb"); + FILE* fp = itksys::SystemTools::Fopen(filename, "rb"); if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8)) { diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx index 1b2152030633bd0e90a49b64f271438419010a76..f3c7c4d5deaf754f2b734b0d625198a5dfcc7bbb 100644 --- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx +++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx @@ -548,9 +548,9 @@ bool CommandLineLauncher::CheckOutputPathsValidity(const std::string & paramKey) { std::string filename = m_Application->GetParameterString(paramKey); itksys::String path = itksys::SystemTools::GetFilenamePath(filename); - if (path!="" && !itksys::SystemTools::FileIsDirectory(path.c_str())) + if (path!="" && !itksys::SystemTools::FileIsDirectory(path)) { - std::cerr <<"ERROR: Directory doesn't exist : "<< path.c_str() << std::endl; + std::cerr <<"ERROR: Directory doesn't exist : "<< path << std::endl; return false; } } @@ -998,7 +998,7 @@ void CommandLineLauncher::DisplayOutputParameters() std::vector<std::string> val = m_Parser->GetAttribut("-testenv", m_VExpression); if( val.size() == 1 ) { - std::ofstream ofs(val[0].c_str()); + std::ofstream ofs(val[0]); if (!ofs.is_open()) { fprintf(stderr, "Error, can't open file"); diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx index 5bc5a76432606e6604f11093255ee5d9b52e14d3..e9a141a13285612073f987f3f5d9fb1641de2972 100644 --- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx +++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx @@ -116,8 +116,8 @@ CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::vector break; } // Add path to result - std::string fullPath = itksys::SystemTools::CollapseFullPath(tmpPath.c_str()); - if( !itksys::SystemTools::FileIsDirectory(fullPath.c_str()) ) + std::string fullPath = itksys::SystemTools::CollapseFullPath(tmpPath); + if( !itksys::SystemTools::FileIsDirectory(fullPath) ) { std::cerr<<"Invalid module path: "<<fullPath<<std::endl; return INVALIDMODULEPATH; @@ -153,7 +153,7 @@ CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::string if( tempModPath.size() > 0 ) { - std::vector<itksys::String> pathAttribut = itksys::SystemTools::SplitString(tempModPath.substr(0, tempModPath.size()).c_str(), ' ', false); + std::vector<itksys::String> pathAttribut = itksys::SystemTools::SplitString(tempModPath.substr(0, tempModPath.size()), ' ', false); // Remove " " string element @@ -165,9 +165,9 @@ CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::string pathAttribut[i].erase(0, 1); } - std::string fullPath = itksys::SystemTools::CollapseFullPath(pathAttribut[i].c_str()); + std::string fullPath = itksys::SystemTools::CollapseFullPath(pathAttribut[i]); - if( !itksys::SystemTools::FileIsDirectory(fullPath.c_str()) ) + if( !itksys::SystemTools::FileIsDirectory(fullPath) ) { std::cerr<<"Invalid module path: "<<fullPath<<std::endl; return INVALIDMODULEPATH; @@ -216,7 +216,7 @@ CommandLineParser::GetModuleName( std::string & modName, const std::vector<std:: CommandLineParser::ParseResultType CommandLineParser::GetModuleName( std::string & modName, const std::string & exp ) { - std::vector<itksys::String> spaceSplitExp = itksys::SystemTools::SplitString(exp.c_str(), ' ', false); + std::vector<itksys::String> spaceSplitExp = itksys::SystemTools::SplitString(exp, ' ', false); // if the chain is " module", SplitString will return: [ ], [module] for(unsigned int i=0; i<spaceSplitExp.size(); i++) { @@ -360,7 +360,7 @@ CommandLineParser::GetAttribut( const std::string & key, const std::string & exp // Only if the key has values associated if( tempModKey.size() > 0 ) { - std::vector<itksys::String> spaceSplit = itksys::SystemTools::SplitString(tempModKey.substr(0, tempModKey.size()).c_str(), ' ', false); + std::vector<itksys::String> spaceSplit = itksys::SystemTools::SplitString(tempModKey.substr(0, tempModKey.size()), ' ', false); // Remove " " string element for(unsigned int i=0; i<spaceSplit.size(); i++)