From 73fe4ebedbac2db4bf579b4945a55cee4a75143d Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Wed, 8 Jul 2009 15:35:11 +0200 Subject: [PATCH] ENH : CONST_PI/180 -> CONST_PI_180 --- Code/BasicFilters/otbGaborFilterGenerator.txx | 4 ++-- Code/BasicFilters/otbLogPolarTransform.txx | 6 +++--- Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx | 2 +- Code/Radiometry/otbImageToReflectanceImageFilter.h | 4 ++-- Code/Radiometry/otbLuminanceToReflectanceImageFilter.h | 4 ++-- .../otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx | 2 +- .../otbMultiChannelsPolarimetricSynthesisFilter.txx | 2 +- Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Code/BasicFilters/otbGaborFilterGenerator.txx b/Code/BasicFilters/otbGaborFilterGenerator.txx index 439eb6ed1b..6977ed8e1e 100644 --- a/Code/BasicFilters/otbGaborFilterGenerator.txx +++ b/Code/BasicFilters/otbGaborFilterGenerator.txx @@ -62,8 +62,8 @@ GaborFilterGenerator<TPrecision> PrecisionType coef,xr,yr,costheta,sintheta; unsigned int k = 0; - costheta = vcl_cos(m_Theta*CONST_PI/180.); - sintheta = vcl_sin(m_Theta*CONST_PI/180.); + costheta = vcl_cos(m_Theta*CONST_PI_180); + sintheta = vcl_sin(m_Theta*CONST_PI_180); for (PrecisionType y = - static_cast<PrecisionType>(m_Radius[1]); diff --git a/Code/BasicFilters/otbLogPolarTransform.txx b/Code/BasicFilters/otbLogPolarTransform.txx index bd98b7cdf2..d39797f99b 100644 --- a/Code/BasicFilters/otbLogPolarTransform.txx +++ b/Code/BasicFilters/otbLogPolarTransform.txx @@ -91,7 +91,7 @@ LogPolarTransform<TScalarType> ::TransformPoint(const InputPointType &point) const { OutputPointType result; - double theta = point[0]*m_Scale[0]*CONST_PI/180.0; + double theta = point[0]*m_Scale[0]*CONST_PI_180; double logRho = point[1]*m_Scale[1]; result[0]=m_Center[0]; result[1]=m_Center[1]; @@ -111,7 +111,7 @@ LogPolarTransform<TScalarType> ::TransformVector(const InputVectorType &vector) const { OutputVectorType result; - double theta = vector[0]*m_Scale[0]*CONST_PI/180.0; + double theta = vector[0]*m_Scale[0]*CONST_PI_180; double logRho = vector[1]*m_Scale[1]; result[0]=0.; result[1]=0.; @@ -132,7 +132,7 @@ LogPolarTransform<TScalarType> ::TransformVector(const InputVnlVectorType &vector) const { OutputVnlVectorType result; - double theta = vector[0]*m_Scale[0]*CONST_PI/180.0; + double theta = vector[0]*m_Scale[0]*CONST_PI_180; double logRho = vector[1]*m_Scale[1]; result[0]=0.; result[1]=0.; diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx index aba6b51e8e..b047aeac36 100644 --- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx +++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx @@ -785,7 +785,7 @@ ImageToSIFTKeyPointSetFilter<TInputImage,TOutputPointSet> if (dist<radius) { // rotate the pixel location to compensate sift orientation - float angle = orientation*CONST_PI/180.; + float angle = orientation*CONST_PI_180; float cosangle = vcl_cos(-angle); float sinangle = vcl_sin(-angle); float rdx = dx * cosangle - dy * sinangle; diff --git a/Code/Radiometry/otbImageToReflectanceImageFilter.h b/Code/Radiometry/otbImageToReflectanceImageFilter.h index c72745d4d9..136c693a4a 100644 --- a/Code/Radiometry/otbImageToReflectanceImageFilter.h +++ b/Code/Radiometry/otbImageToReflectanceImageFilter.h @@ -305,7 +305,7 @@ protected: otb_6s_integer month = static_cast<otb_6s_integer>(m_Month); int cr(0); cr = otb_6s_varsol_(&day, &month, &dsol); - coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI/180.)*static_cast<double>(dsol); + coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI_180)*static_cast<double>(dsol); } else { @@ -314,7 +314,7 @@ protected: } else { - coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI/180.)*m_FluxNormalizationCoefficient*m_FluxNormalizationCoefficient; + coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI_180)*m_FluxNormalizationCoefficient*m_FluxNormalizationCoefficient; } functor.SetIlluminationCorrectionCoefficient(1. / coefTemp); functor.SetAlpha(m_Alpha[i]); diff --git a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h index fdd8236b4b..3269618895 100644 --- a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h +++ b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h @@ -269,7 +269,7 @@ protected: otb_6s_integer month = static_cast<otb_6s_integer>(m_Month); int cr(0); cr = otb_6s_varsol_(&day, &month, &dsol); - coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI/180.)*static_cast<double>(dsol); + coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI_180)*static_cast<double>(dsol); } else { @@ -278,7 +278,7 @@ protected: } else { - coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI/180.)*m_FluxNormalizationCoefficient*m_FluxNormalizationCoefficient; + coefTemp = vcl_cos(m_ZenithalSolarAngle*CONST_PI_180)*m_FluxNormalizationCoefficient*m_FluxNormalizationCoefficient; } functor.SetIlluminationCorrectionCoefficient(1. / coefTemp); functor.SetSolarIllumination(static_cast<double>(m_SolarIllumination[i])); diff --git a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx index bbaba16c90..3a300a4632 100644 --- a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx +++ b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx @@ -129,7 +129,7 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage> double notUsed1,notUsed2; double factor = 1; double palt = 1000.; - SIXSTraits::ComputeEnvironmentalContribution(rayleigh,aerosol,radiusMatrix(i,j),palt,vcl_cos(m_ZenithalViewingAngle*CONST_PI/180.),notUsed1,notUsed2,factor); //Call to 6S + SIXSTraits::ComputeEnvironmentalContribution(rayleigh,aerosol,radiusMatrix(i,j),palt,vcl_cos(m_ZenithalViewingAngle*CONST_PI_180),notUsed1,notUsed2,factor); //Call to 6S currentWeightingMatrix(i,j)=factor; } } diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx index 9f7af5bc34..7cefec284e 100644 --- a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx +++ b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx @@ -241,7 +241,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction> ComplexArrayType AEi, AEr; /** Conversion coefficient Degre To Radian */ - double DTOR=CONST_PI/180; + double DTOR=CONST_PI_180; double real,imag; real = vcl_cos(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI); diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx index 4a0467c7c4..db4c458f81 100644 --- a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx +++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx @@ -216,7 +216,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag ComplexArrayType AEi, AEr; /** Conversion coefficient Degre To Radian */ - double DTOR=CONST_PI/180; + double DTOR=CONST_PI_180; double real,imag; real = vcl_cos(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI); -- GitLab