From 43f143d7da42bfe8062e69e2c6044f8742c3b723 Mon Sep 17 00:00:00 2001 From: OTB Bot <otbbot@orfeo-toolbox.org> Date: Tue, 13 Dec 2011 19:55:44 +0100 Subject: [PATCH] STYLE --- Applications/Utils/otbColorMapping.cxx | 18 +++++++----------- .../otbWrapperElevationParametersHandler.cxx | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Applications/Utils/otbColorMapping.cxx b/Applications/Utils/otbColorMapping.cxx index 2894c31da5..88dbae4ee3 100644 --- a/Applications/Utils/otbColorMapping.cxx +++ b/Applications/Utils/otbColorMapping.cxx @@ -55,7 +55,6 @@ namespace Functor { - template <class TLabel, class TValue> class RGBFromImageValueFunctor { public: @@ -143,7 +142,7 @@ public: { MeanValueMapType MeanMap; - for(unsigned int i=0;i<m_WeigthingMap.size();i++) + for(unsigned int i=0; i<m_WeigthingMap.size(); i++) { TValue value = m_LabelToImageIntensityMap[i]; for (unsigned int index = 0; index < value.Size(); index++) @@ -184,7 +183,6 @@ private: } - class ColorMapping: public Application { public: @@ -216,7 +214,6 @@ public: typedef itk::ImageRegionConstIterator<UInt16ImageType> LabelIteratorType; - // Manual label LUT typedef otb::ChangeLabelImageFilter <LabelImageType, VectorImageType> ChangeLabelFilterType; @@ -251,8 +248,8 @@ public: typedef otb::ImageMetadataInterfaceBase ImageMetadataInterfaceType; - typedef Functor::RGBFromImageValueFunctor<LabelType,FloatVectorImageType::PixelType> RGBFromImageValueFunctorType; - typedef itk::BinaryFunctorImageFilter<LabelImageType,FloatVectorImageType,LabelImageType, + typedef Functor::RGBFromImageValueFunctor<LabelType, FloatVectorImageType::PixelType> RGBFromImageValueFunctorType; + typedef itk::BinaryFunctorImageFilter<LabelImageType, FloatVectorImageType, LabelImageType, RGBFromImageValueFunctorType> RGBFromImageValueFilterType; private: @@ -511,9 +508,9 @@ private: // Generate histogramFilter->Update(); - HistogramListType::Pointer histogramList = histogramFilter->GetOutput();// + HistogramListType::Pointer histogramList = histogramFilter->GetOutput(); // // HistogramPointerType histoBand=histogramList->GetNelements(0); - // std::cout<<histoBand->GetFrequency(0,0)<<std::endl; + // std::cout<<histoBand->GetFrequency(0, 0)<<std::endl; ImageMetadataInterfaceType::Pointer @@ -537,8 +534,8 @@ private: for (unsigned int index = 0; index < supportImage->GetNumberOfComponentsPerPixel(); index++) { - minVal.SetElement(index,static_cast<FloatVectorImageType::PixelType::ValueType> (histogramList->GetNthElement(index)->Quantile(0,static_cast<float> (this->GetParameterInt("method.image.low"))/ 100.0))); - maxVal.SetElement(index,static_cast<FloatVectorImageType::PixelType::ValueType> (histogramList->GetNthElement(index)->Quantile(0,(100.0- static_cast<float> (this->GetParameterInt("method.image.up")))/ 100.0))); + minVal.SetElement(index, static_cast<FloatVectorImageType::PixelType::ValueType> (histogramList->GetNthElement(index)->Quantile(0, static_cast<float> (this->GetParameterInt("method.image.low"))/ 100.0))); + maxVal.SetElement(index, static_cast<FloatVectorImageType::PixelType::ValueType> (histogramList->GetNthElement(index)->Quantile(0, (100.0- static_cast<float> (this->GetParameterInt("method.image.up")))/ 100.0))); } // create functor @@ -593,7 +590,6 @@ private: } - SetParameterOutputImage("out", m_RBGFromImageMapper->GetOutput()); diff --git a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx index 5c116907b9..2d14fe4a57 100644 --- a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx +++ b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx @@ -144,7 +144,7 @@ ElevationParametersHandler::IsGeoidUsed(const Application::Pointer app, const st return app->IsParameterEnabled(geoidKey.str()) && app->HasValue(geoidKey.str()); } -bool +bool ElevationParametersHandler::IsElevationEnabled(const Application::Pointer app, const std::string & key) { return app->IsParameterEnabled(key); -- GitLab