Commit 0c2138ff authored by Rashad Kanavath's avatar Rashad Kanavath

use boost::lexical_cast from otbStringUtils

parent 81bcab7a
......@@ -18,7 +18,7 @@
#include "otbIkonosImageMetadataInterface.h"
#include <boost/algorithm/string.hpp>
#include "otbStringUtils.h"
#include "itkMetaDataObject.h"
#include "otbImageKeywordlist.h"
......
......@@ -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");
}
......
......@@ -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;
......
......@@ -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