From fa1ce319344065aa0e9bc7aadd2d78d6e8774c4f Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@orfeo-toolbox.org> Date: Wed, 25 Jan 2012 21:00:25 +0100 Subject: [PATCH] COMP:update ReadImageInfo application with new GroundSpacingEstimation design --- Applications/Utils/otbReadImageInfo.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Applications/Utils/otbReadImageInfo.cxx b/Applications/Utils/otbReadImageInfo.cxx index f3ebe9effe..2afced063e 100644 --- a/Applications/Utils/otbReadImageInfo.cxx +++ b/Applications/Utils/otbReadImageInfo.cxx @@ -248,7 +248,8 @@ private: GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New(); groundSpacing->SetInputImage(inImage); - FloatType approxGroundSpacing = std::make_pair(itk::NumericTraits<ValueType>::Zero, itk::NumericTraits<ValueType>::min()); + FloatType approxGroundSpacing; + approxGroundSpacing.Fill(itk::NumericTraits<ValueType>::Zero); FloatVectorImageType::IndexType index; vnl_random rand(12345); @@ -259,8 +260,8 @@ private: approxGroundSpacing = groundSpacing->EvaluateAtIndex(index); //Get image estimated ground spacing (in m) - SetParameterFloat("estimatedgroundspacingx", approxGroundSpacing.first); - SetParameterFloat("estimatedgroundspacingy", approxGroundSpacing.second); + SetParameterFloat("estimatedgroundspacingx", approxGroundSpacing[0]); + SetParameterFloat("estimatedgroundspacingy", approxGroundSpacing[1]); ossOutput << "\tEstimated ground spacing (in meters): [" << GetParameterFloat("estimatedgroundspacingx") << "," << GetParameterFloat("estimatedgroundspacingy") << "]" << std::endl; -- GitLab