Commit b5e5f696 authored by Rashad Kanavath's avatar Rashad Kanavath

Revert "use boost::lexical_cast from otbStringUtils"

This reverts commit 0c2138ff.
parent 27eeb019
......@@ -18,7 +18,7 @@
#include "otbIkonosImageMetadataInterface.h"
#include "otbStringUtils.h"
#include <boost/algorithm/string.hpp>
#include "itkMetaDataObject.h"
#include "otbImageKeywordlist.h"
......
......@@ -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");
}
......
......@@ -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;
......
......@@ -18,9 +18,9 @@
#include "otbWorldView2ImageMetadataInterface.h"
#include <boost/algorithm/string.hpp>
#include "itkMetaDataObject.h"
#include "otbImageKeywordlist.h"
#include "otbStringUtils.h"
namespace otb
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment