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