diff --git a/Modules/Core/Metadata/src/otbIkonosImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbIkonosImageMetadataInterface.cxx index 7cf23145d88e6d4400d85708473657051f9bb8cc..1751f14b93fd4bd3db85a9e04a27af2ae0ae2d1b 100644 --- a/Modules/Core/Metadata/src/otbIkonosImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbIkonosImageMetadataInterface.cxx @@ -18,7 +18,7 @@ #include "otbIkonosImageMetadataInterface.h" -#include "otbStringUtils.h" +#include <boost/algorithm/string.hpp> #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" diff --git a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx index 54e14a358d57efa7f92fd9669167ea6a906c5bdb..4dd3f84191092d243882683c76d17bea7bc4eab0 100644 --- a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx @@ -18,17 +18,19 @@ #include "otbPleiadesImageMetadataInterface.h" +#include <boost/algorithm/string.hpp> #include "otbMacro.h" #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" - -#include "otbStringUtils.h" +#include <boost/lexical_cast.hpp> //useful constants #include <otbMath.h> namespace otb { +using boost::lexical_cast; +using boost::bad_lexical_cast; PleiadesImageMetadataInterface ::PleiadesImageMetadataInterface() @@ -223,9 +225,9 @@ PleiadesImageMetadataInterface::GetDay() const int value; try { - value = boost::lexical_cast<int> (outputValues[2]); + value = lexical_cast<int> (outputValues[2]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Day"); } @@ -261,9 +263,9 @@ PleiadesImageMetadataInterface::GetMonth() const int value; try { - value = boost::lexical_cast<int> (outputValues[1]); + value = lexical_cast<int> (outputValues[1]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Month"); } @@ -298,9 +300,9 @@ PleiadesImageMetadataInterface::GetYear() const int value; try { - value = boost::lexical_cast<int> (outputValues[0]); + value = lexical_cast<int> (outputValues[0]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Year"); } @@ -335,9 +337,9 @@ PleiadesImageMetadataInterface::GetHour() const int value; try { - value = boost::lexical_cast<int> (outputValues[3]); + value = lexical_cast<int> (outputValues[3]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Hour"); } @@ -372,9 +374,9 @@ PleiadesImageMetadataInterface::GetMinute() const int value; try { - value = boost::lexical_cast<int> (outputValues[4]); + value = lexical_cast<int> (outputValues[4]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Minute"); } @@ -409,9 +411,9 @@ PleiadesImageMetadataInterface::GetProductionDay() const int value; try { - value = boost::lexical_cast<int> (outputValues[2]); + value = lexical_cast<int> (outputValues[2]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Day"); } @@ -446,9 +448,9 @@ PleiadesImageMetadataInterface::GetProductionMonth() const int value; try { - value = boost::lexical_cast<int> (outputValues[1]); + value = lexical_cast<int> (outputValues[1]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Month"); } @@ -485,9 +487,9 @@ PleiadesImageMetadataInterface::GetProductionYear() const int value; try { - value = boost::lexical_cast<int> (outputValues[0]); + value = lexical_cast<int> (outputValues[0]); } - catch (boost::bad_lexical_cast &) + catch (bad_lexical_cast &) { itkExceptionMacro(<< "Invalid Year"); } diff --git a/Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx index e1ab8dd2d518cdad40dffab9ada6476e79d14bb3..05ce27346ddd3ade6a77ae24e0456ed0ad71b188 100644 --- a/Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbTerraSarImageMetadataInterface.cxx @@ -17,6 +17,8 @@ =========================================================================*/ #include "otbTerraSarImageMetadataInterface.h" + +#include <boost/algorithm/string.hpp> #include "otbMath.h" #include "itkIndex.h" #include "itkMetaDataObject.h" @@ -1177,8 +1179,8 @@ TerraSarImageMetadataInterface for (unsigned int i = 0; i < cornerIncidenceAngleIndex.size(); ++i) { - p0[0] = cornerIncidenceAngleIndex[i][0]; - p0[1] = cornerIncidenceAngleIndex[i][1]; + p0[0] = cornerIncidenceAngleIndex.at(i)[0]; + p0[1] = cornerIncidenceAngleIndex.at(i)[1]; points->SetPoint(noPoint, p0); points->SetPointData(noPoint, cornerIncidenceAngleValue[i] * CONST_PI_180); @@ -1198,11 +1200,13 @@ TerraSarImageMetadataInterface return polynomSize; } -/** Get the R, G, B channel */ -TerraSarImageMetadataInterface::UIntVectorType -TerraSarImageMetadataInterface::GetDefaultDisplay() const + + /** Get the R, G, B channel */ +std::vector<unsigned int> +TerraSarImageMetadataInterface +::GetDefaultDisplay() const { - UIntVectorType rgb(3); + std::vector<unsigned int> rgb(3); rgb[0] = 0; rgb[1] = 0; rgb[2] = 0; diff --git a/Modules/Core/Metadata/src/otbWorldView2ImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbWorldView2ImageMetadataInterface.cxx index bd7c36eea4102c920e36acf44dadc3e6e2d26458..7f78cf62807ca422a29fb21fe15b87cb494e8525 100644 --- a/Modules/Core/Metadata/src/otbWorldView2ImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbWorldView2ImageMetadataInterface.cxx @@ -18,9 +18,9 @@ #include "otbWorldView2ImageMetadataInterface.h" +#include <boost/algorithm/string.hpp> #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" -#include "otbStringUtils.h" namespace otb {