diff --git a/Code/SARPolarimetry/CMakeLists.txt b/Code/SARPolarimetry/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbHermitianEigenAnalysis.h b/Code/SARPolarimetry/otbHermitianEigenAnalysis.h old mode 100644 new mode 100755 index fdc417d5bbe0f55f962eafa59f96e95393486f2b..16001824ae9bba73af0305911c6044885f74d341 --- a/Code/SARPolarimetry/otbHermitianEigenAnalysis.h +++ b/Code/SARPolarimetry/otbHermitianEigenAnalysis.h @@ -1,13 +1,14 @@ /*========================================================================= - Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile: otbHermitianEigenAnalysis.h, v $ + Program: ORFEO Toolbox Language: C++ - Date: $Date: 2005/07/09 22:43:35 $ - Version: $Revision: 1.5 $ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. - Copyright (c) Insight Software Consortium. All rights reserved. - See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -56,6 +57,8 @@ namespace otb * num. math. 11, 293-306(1968) by bowdler, martin, reinsch, and * wilkinson. * handbook for auto. comp., vol.ii-linear algebra, 227-240(1971). + * + * \ingroup SARPolarimetry */ template < typename TMatrix, typename TVector, typename TEigenMatrix=TMatrix > @@ -85,7 +88,7 @@ public: m_OrderEigenValues(OrderByValue) {}; - ~HermitianEigenAnalysis() {}; + virtual ~HermitianEigenAnalysis() {}; typedef TMatrix MatrixType; typedef TEigenMatrix EigenMatrixType; diff --git a/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx b/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h b/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h old mode 100644 new mode 100755 index 61ca413afb4b8c682e70a6d353b20665cc01938e..937b08dc15adf38fdd40e000abd3a89e4e895be4 --- a/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h @@ -45,6 +45,12 @@ namespace Functor { * \f$ S_{ll} = S_{ll}^{*} = 1/2 * ( -S_{xx} - j*2*S_{xy} + S_{yy}) \f$ * \f$ S_{lr} = S_{rl} = 1/2 * ( -S_{xx} - S_{yy}) \f$ * + * \infgroup Functor + * \ingroup SARPolarimetry + * + * \sa MLCToCoherencyDegreeImageFilter + * \sa MLCToCoherencyImageFilter + * */ template< class TInput, class TOutput> class MLCToCircularCoherencyDegreeFunctor @@ -60,24 +66,24 @@ public: result.SetSize(m_NumberOfComponentsPerPixel); result.Fill(0.0); - RealType C1 = static_cast<RealType>(Covariance[0].real()); // C1 <hh.hh*> - RealType C2 = static_cast<RealType>(Covariance[3].real()); // C2 <hv.hv*> - RealType C3 = static_cast<RealType>(Covariance[5].real()); // C3 <vv.vv*> - RealType C4 = static_cast<RealType>(Covariance[1].real()); // C4 Re<hh.hv*> - RealType C5 = static_cast<RealType>(Covariance[1].imag()); // C5 Im<hh.hv*> - RealType C6 = static_cast<RealType>(Covariance[2].real()); // C6 Re<hh.vv*> - RealType C7 = static_cast<RealType>(Covariance[2].imag()); // C7 Im<hh.vv*> - RealType C8 = static_cast<RealType>(Covariance[4].real()); // C8 Re<hv.vv*> - RealType C9 = static_cast<RealType>(Covariance[4].imag()); // C9 Im<hv.vv*> + const RealType C1 = static_cast<RealType>(Covariance[0].real()); // C1 <hh.hh*> + const RealType C2 = static_cast<RealType>(Covariance[3].real()); // C2 <hv.hv*> + const RealType C3 = static_cast<RealType>(Covariance[5].real()); // C3 <vv.vv*> + const RealType C4 = static_cast<RealType>(Covariance[1].real()); // C4 Re<hh.hv*> + const RealType C5 = static_cast<RealType>(Covariance[1].imag()); // C5 Im<hh.hv*> + const RealType C6 = static_cast<RealType>(Covariance[2].real()); // C6 Re<hh.vv*> + const RealType C7 = static_cast<RealType>(Covariance[2].imag()); // C7 Im<hh.vv*> + const RealType C8 = static_cast<RealType>(Covariance[4].real()); // C8 Re<hv.vv*> + const RealType C9 = static_cast<RealType>(Covariance[4].imag()); // C9 Im<hv.vv*> - RealType llrrReal = 0.25 * ( C1 + C3 -4*C2 -2*C6); - RealType llrrImag = -(C4 + C8); + const RealType llrrReal = 0.25 * ( C1 + C3 -4*C2 -2*C6); + const RealType llrrImag = -(C4 + C8); - RealType lllrReal = 0.25 * ( C1 - C3 - 2*C5 + 2*C9); - RealType lllrImag = -0.5*(C7+C4+C8); + const RealType lllrReal = 0.25 * ( C1 - C3 - 2*C5 + 2*C9); + const RealType lllrImag = -0.5*(C7+C4+C8); - RealType rrlrReal = 0.25 * ( C1 -C3 + 2*C5 - 2*C9); - RealType rrlrImag = 0.5 * (C4+C8-C7); + const RealType rrlrReal = 0.25 * ( C1 -C3 + 2*C5 - 2*C9); + const RealType rrlrImag = 0.5 * (C4+C8-C7); RealType ll2 = 0.25 * ( C1 + C3 + 4*C2 - 2*C6 - 4*C5 - 4*C9); RealType rr2 = 0.25 * ( C1 + C3 + 4*C2 - 2*C6 + 4*C5 + 4*C9); @@ -114,7 +120,7 @@ public: MLCToCircularCoherencyDegreeFunctor() : m_NumberOfComponentsPerPixel(3) {} /** Destructor */ - ~MLCToCircularCoherencyDegreeFunctor() {} + virtual ~MLCToCircularCoherencyDegreeFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h b/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h old mode 100644 new mode 100755 index fa19f292e4850f724a9dbb5740af0b0eec91475d..a9edf7d9fb1ad3fcb6dfde60791d67e89bb039e2 --- a/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h @@ -29,11 +29,16 @@ namespace Functor { /** \class otbMLCToCoherencyDegreeFunctor * \brief Evaluate the Coherency Degree coefficient from from the MLC image * - * * Output value are: + * Output value are: * channel #0 : \f$ abs(S_{hh}*S_{vv}}^{*}) / sqrt(S_{hh}*S_{hh}}^{*}) / sqrt(S_{vv}*S_{vv}}^{*})\f$ * channel #1 : \f$ abs(S_{hv}*S_{vv}}^{*}) / sqrt(S_{hv}*S_{hv}}^{*}) / sqrt(S_{vv}*S_{vv}}^{*}) \f$ * channel #2 : \f$ abs(S_{hh}*S_{hv}}^{*}) / sqrt(S_{hh}*S_{hh}}^{*}) / sqrt(S_{hv}*S_{hv}}^{*}) \f$ * + * \infgroup Functor + * \ingroup SARPolarimetry + * + * \sa MLCToCircularCoherencyDegreeImageFilter + * \sa MLCToCoherencyImageFilter */ template< class TInput, class TOutput> class MLCToCoherencyDegreeFunctor @@ -49,12 +54,12 @@ public: result.SetSize(m_NumberOfComponentsPerPixel); result.Fill(0.0); - RealType C11 = static_cast<RealType>(Covariance[0].real()); - ComplexType C12 = static_cast<ComplexType>(Covariance[1]); - ComplexType C13 = static_cast<ComplexType>(Covariance[2]); - RealType C22 = static_cast<RealType>(Covariance[3].real()); - ComplexType C23 = static_cast<ComplexType>(Covariance[4]); - RealType C33 = static_cast<RealType>(Covariance[5].real()); + const RealType C11 = static_cast<RealType>(Covariance[0].real()); + const ComplexType C12 = static_cast<ComplexType>(Covariance[1]); + const ComplexType C13 = static_cast<ComplexType>(Covariance[2]); + const RealType C22 = static_cast<RealType>(Covariance[3].real()); + const ComplexType C23 = static_cast<ComplexType>(Covariance[4]); + const RealType C33 = static_cast<RealType>(Covariance[5].real()); if ((C11 >0.00001) && (C33 > 0.0001)) { @@ -83,7 +88,7 @@ public: MLCToCoherencyDegreeFunctor() : m_NumberOfComponentsPerPixel(3) {} /** Destructor */ - ~MLCToCoherencyDegreeFunctor() {} + virtual ~MLCToCoherencyDegreeFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h b/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h old mode 100644 new mode 100755 index a8b2511b423fac6c377fcbd9fe36996f371610cd..0dbc3a47281c38444279727b141a5a548a86197a --- a/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h @@ -29,7 +29,7 @@ namespace Functor { /** \class otbMLCToCoherencyFunctor * \brief Evaluate the Coherency matrix from from the MLC image * - * * Output value are: + * Output value are: * channel #0 : \f$ 0.5 * (S_{hh}+S_{vv}.(S_{hh}+S_{vv})^{*} \f$ * channel #1 : \f$ 0.5 * (S_{hh}+S_{vv}.(S_{hh}-S_{vv})^{*} \f$ * channel #2 : \f$ (S_{hh}+S_{vv}.(S_{hv})^{*} \f$ @@ -37,6 +37,11 @@ namespace Functor { * channel #4 : \f$ (S_{hh}-S_{vv}.(S_{hv})^{*} \f$ * channel #5 : \f$ 2.0*S_{hv}.S_{hv}^{*} \f$ * + * \infgroup Functor + * \ingroup SARPolarimetry + * + * \sa MLCToCircularCoherencyDegreeImageFilter + * \sa MLCToCoherencyDegreeImageFilter */ template< class TInput, class TOutput> class MLCToCoherencyFunctor @@ -50,16 +55,16 @@ public: TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); - ComplexType C11 = static_cast<ComplexType>(Covariance[0]); - ComplexType C12 = static_cast<ComplexType>(Covariance[1]); - ComplexType C13 = static_cast<ComplexType>(Covariance[2]); - ComplexType C22 = static_cast<ComplexType>(Covariance[3]); - ComplexType C23 = static_cast<ComplexType>(Covariance[4]); - ComplexType C33 = static_cast<ComplexType>(Covariance[5]); + const ComplexType C11 = static_cast<ComplexType>(Covariance[0]); + const ComplexType C12 = static_cast<ComplexType>(Covariance[1]); + const ComplexType C13 = static_cast<ComplexType>(Covariance[2]); + const ComplexType C22 = static_cast<ComplexType>(Covariance[3]); + const ComplexType C23 = static_cast<ComplexType>(Covariance[4]); + const ComplexType C33 = static_cast<ComplexType>(Covariance[5]); - ComplexType C21 = vcl_conj(C12); - ComplexType C31 = vcl_conj(C13); - ComplexType C32 = vcl_conj(C23); + const ComplexType C21 = vcl_conj(C12); + const ComplexType C31 = vcl_conj(C13); + const ComplexType C32 = vcl_conj(C23); result[0] = static_cast<OutputValueType>( 0.5*(C11 + C13 + C31 + C33) ); result[1] = static_cast<OutputValueType>( 0.5*(C11 - C13 + C31 - C33) ); @@ -80,7 +85,7 @@ public: MLCToCoherencyFunctor() : m_NumberOfComponentsPerPixel(6) {} /** Destructor */ - ~MLCToCoherencyFunctor() {} + virtual ~MLCToCoherencyFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h old mode 100644 new mode 100755 index f64c0663638029cf431d5fd287c78e07ec2fdb17..c35a49119102774708c824ad5bc1e87d06062862 --- a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h @@ -30,6 +30,11 @@ namespace Functor { * \brief Evaluate the Circular Polarisation image * (3 channels : LL, RR and LR) from the Mueller image * + * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa MuellerToMLCImageFilter + * \sa MuellerToPolarisationDegreeAndPowerImageFilter * */ template< class TInput, class TOutput> @@ -44,10 +49,10 @@ public: TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); - RealType M11 = static_cast<RealType>(Mueller[0]); - RealType M14 = static_cast<RealType>(Mueller[3]); - RealType M41 = static_cast<RealType>(Mueller[12]); - RealType M44 = static_cast<RealType>(Mueller[15]); + const RealType M11 = static_cast<RealType>(Mueller[0]); + const RealType M14 = static_cast<RealType>(Mueller[3]); + const RealType M41 = static_cast<RealType>(Mueller[12]); + const RealType M44 = static_cast<RealType>(Mueller[15]); result[0] = static_cast<OutputValueType>( M11 + M14 + M41 + M44 ); // LL result[1] = static_cast<OutputValueType>( M11 - M14 - M41 + M44 ); // RR @@ -65,7 +70,7 @@ public: MuellerToCircularPolarisationFunctor() : m_NumberOfComponentsPerPixel(3) {} /** Destructor */ - ~MuellerToCircularPolarisationFunctor() {} + virtual ~MuellerToCircularPolarisationFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h b/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h old mode 100644 new mode 100755 index 90c0563e8f092be158949149fedbe99d8e0ac74c..97a45886f0388f87a9101ff63dbcce25dc2bcfc4 --- a/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h @@ -29,6 +29,12 @@ namespace Functor { /** \class otbMuellerToMLCFunctor * \brief Evaluate the MLC image from the Mueller image * + * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa MuellerToCircularPolarisationImageFilter + * \sa MuellerToPolarisationDegreeAndPowerImageFilter + * */ template< class TInput, class TOutput> class MuellerToMLCFunctor @@ -44,29 +50,29 @@ public: TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); - RealType M11 = static_cast<RealType>(Mueller[0]); - RealType M12 = static_cast<RealType>(Mueller[1]); - RealType M13 = static_cast<RealType>(Mueller[2]); - RealType M14 = static_cast<RealType>(Mueller[3]); - RealType M21 = static_cast<RealType>(Mueller[4]); - RealType M22 = static_cast<RealType>(Mueller[5]); - RealType M23 = static_cast<RealType>(Mueller[6]); - RealType M24 = static_cast<RealType>(Mueller[7]); - RealType M31 = static_cast<RealType>(Mueller[8]); - RealType M32 = static_cast<RealType>(Mueller[9]); - RealType M33 = static_cast<RealType>(Mueller[10]); - RealType M34 = static_cast<RealType>(Mueller[11]); - RealType M41 = static_cast<RealType>(Mueller[12]); - RealType M42 = static_cast<RealType>(Mueller[13]); - RealType M43 = static_cast<RealType>(Mueller[14]); - RealType M44 = static_cast<RealType>(Mueller[15]); - - ComplexType hhhh(M11+M22+2.*M12, 0.0); - ComplexType hvhv(M11-M22, 0.0); - ComplexType vvvv(M11+M22-2.*M12, 0.0); - ComplexType hhhv(M13+M23, -1.*(M14+M24)); - ComplexType hhvv(M33-M44, -2.*M34); - ComplexType hvvv(M13-M23, -1.*(M14-M24)); + const RealType M11 = static_cast<RealType>(Mueller[0]); + const RealType M12 = static_cast<RealType>(Mueller[1]); + const RealType M13 = static_cast<RealType>(Mueller[2]); + const RealType M14 = static_cast<RealType>(Mueller[3]); + const RealType M21 = static_cast<RealType>(Mueller[4]); + const RealType M22 = static_cast<RealType>(Mueller[5]); + const RealType M23 = static_cast<RealType>(Mueller[6]); + const RealType M24 = static_cast<RealType>(Mueller[7]); + const RealType M31 = static_cast<RealType>(Mueller[8]); + const RealType M32 = static_cast<RealType>(Mueller[9]); + const RealType M33 = static_cast<RealType>(Mueller[10]); + const RealType M34 = static_cast<RealType>(Mueller[11]); + const RealType M41 = static_cast<RealType>(Mueller[12]); + const RealType M42 = static_cast<RealType>(Mueller[13]); + const RealType M43 = static_cast<RealType>(Mueller[14]); + const RealType M44 = static_cast<RealType>(Mueller[15]); + + const ComplexType hhhh(M11+M22+2.*M12, 0.0); + const ComplexType hvhv(M11-M22, 0.0); + const ComplexType vvvv(M11+M22-2.*M12, 0.0); + const ComplexType hhhv(M13+M23, -1.*(M14+M24)); + const ComplexType hhvv(M33-M44, -2.*M34); + const ComplexType hvvv(M13-M23, -1.*(M14-M24)); result[0] = static_cast<OutputValueType>( hhhh ); result[1] = static_cast<OutputValueType>( 2.* hhhv ); @@ -87,7 +93,7 @@ public: MuellerToMLCFunctor() : m_NumberOfComponentsPerPixel(6) {} /** Destructor */ - ~MuellerToMLCFunctor() {} + virtual ~MuellerToMLCFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h old mode 100644 new mode 100755 index 6182990e217ccaf736614bb2f7162e439ee1ce26..cf103ab1e5b8f579d5ee151931a825427af9bb90 --- a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h @@ -34,6 +34,12 @@ namespace Functor { * \brief Evaluate the min and max polarisation degree and min and max power * from the Mueller image * + * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa MuellerToCircularPolarisationImageFilter + * \sa MuellerToMLCImageFilter + * */ template< class TInput, class TOutput> class MuellerToPolarisationDegreeAndPowerFunctor @@ -151,7 +157,7 @@ public: MuellerToPolarisationDegreeAndPowerFunctor() : m_NumberOfComponentsPerPixel(4) {} /** Destructor */ - ~MuellerToPolarisationDegreeAndPowerFunctor() {} + virtual ~MuellerToPolarisationDegreeAndPowerFunctor() {} private: unsigned int m_NumberOfComponentsPerPixel; diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbPolarimetricData.cxx b/Code/SARPolarimetry/otbPolarimetricData.cxx old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbPolarimetricData.h b/Code/SARPolarimetry/otbPolarimetricData.h old mode 100644 new mode 100755 index 6a230fbc143dd1696c9d3f54b5e05f0383767846..81037e26e39a5cdf9a2b49bf9a14c1e10c9c8592 --- a/Code/SARPolarimetry/otbPolarimetricData.h +++ b/Code/SARPolarimetry/otbPolarimetricData.h @@ -40,9 +40,10 @@ typedef enum /** \class PolarimetricData * \brief This class allows to determine the type of architecture we get. +* +* HH_HV_VH_VV (0), HH_HV_VV (1), HH_VH_VV (2), HH_HV(3), VH_VV (4), HH_VV (5). * -* -* \sa +* \ingroup SARPolarimetry */ class ITK_EXPORT PolarimetricData : public itk::DataObject @@ -73,7 +74,7 @@ protected: /** Constructor */ PolarimetricData(); /** Destructor */ - ~PolarimetricData() {} + virtual ~PolarimetricData() {} /**PrintSelf method */ void PrintSelf(std::ostream& os, itk::Indent indent) const; diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h old mode 100644 new mode 100755 index b6c6255632e579a27d3b21589a8a1bc231428e87..53551f4eefe9689dc13305c32b4f0b7de5653117 --- a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h +++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h @@ -54,6 +54,10 @@ namespace otb * the type of the output image. It is also parameterized by the * operation to be applied, using a Functor style. * + * + * \ingroup SARPolarimetry + * \sa PolarimetricSynthesisFunctor + * */ template <class TInputImageHH, class TInputImageHV, class TInputImageVH, class TInputImageVV, class TOutputImage, diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h b/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h old mode 100644 new mode 100755 index 8f6cd87b03895f631ad93fc89deabd4a4aea7ce2..0f23625cfba3b59b7c7d5c9b78d8ea1ce04558ae --- a/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h +++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h @@ -32,6 +32,7 @@ namespace Functor \vec(E_{r})\cdot\left[ S \right] \vec(E_{i}) \f$ * * \ingroup Functor + * \ingroup SARPolarimetry */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> class PolarimetricSynthesisFunctor @@ -69,7 +70,7 @@ public: tmp = vcl_conj(m_Er[0]) * (m_Ei[0] * static_cast<ComplexType>(Shh) + m_Ei[1] * static_cast<ComplexType>(Shv)) + vcl_conj(m_Er[1]) * (m_Ei[0] * static_cast<ComplexType>(Svh) + m_Ei[1] * static_cast<ComplexType>(Svv)); - scalar = (double) (vcl_pow(vcl_abs(tmp), 2)); + scalar = static_cast<double>(vcl_abs(tmp)) * static_cast<double>(vcl_abs(tmp)); return (static_cast<TOutput>(scalar)); } diff --git a/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h b/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h old mode 100644 new mode 100755 index 38cbede26a18e9a230a0a5ee9fdd7cc75bfb093f..c7412fd8b283cbb02ad3eed023f731ecccfe6914 --- a/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h +++ b/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h @@ -29,6 +29,7 @@ namespace Functor { /** \class otbCoherencyToMuellerFunctor * \brief Evaluate the Mueller matrix from the reciprocal coherency matrix image * + * \ingroup SARPolarimetry */ template< class TInput, class TOutput> class ReciprocalCoherencyToMuellerFunctor @@ -76,7 +77,7 @@ public: ReciprocalCoherencyToMuellerFunctor() {} /** Destructor */ - ~ReciprocalCoherencyToMuellerFunctor() {} + virtual ~ReciprocalCoherencyToMuellerFunctor() {} private: itkStaticConstMacro(NumberOfComponentsPerPixel, unsigned int, 10); diff --git a/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.h b/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.h old mode 100644 new mode 100755 index 760a203ca91ec4eb5aa8d193b313ed8b599e969a..0cdb0ff672e3a56730c3a14790db7bd0c7e18990 --- a/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.h +++ b/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.h @@ -32,11 +32,13 @@ namespace Functor { /** \class otbHAlphaFunctor * \brief Evaluate the H-Alpha parameters from the reciprocal coherency matrix image * - * * Output value are: + * Output value are: * channel #0 : entropy * channel #1 : \f$ \alpha \f$ parameter * channel #2 : anisotropy * + * \ingroup SARPolarimetry + * */ template< class TInput, class TOutput> class ReciprocalHAlphaFunctor @@ -71,7 +73,7 @@ public: inline TOutput operator()( const TInput & Coherency ) const { TOutput result; - result.SetSize(NumberOfComponentsPerPixel); + result.SetSize(m_NumberOfComponentsPerPixel); CoherencyMatrixType T; EigenvalueType eigenValues; @@ -95,7 +97,7 @@ public: RealType entropy; RealType alpha; RealType anisotropy; - const RealType epsilon = 1.0E-4; + //const RealType epsilon = 1.0E-4; totalEigenValues = static_cast<RealType>( eigenValues[0] + eigenValues[1] + eigenValues[2]); @@ -110,7 +112,7 @@ public: p[k] = static_cast<RealType>(eigenValues[k]) / totalEigenValues; } - if ( (p[0] < epsilon) || (p[1] < epsilon) || (p[2] < epsilon) ) + if ( (p[0] < m_Epsilon) || (p[1] < m_Epsilon) || (p[2] < m_Epsilon) ) { entropy =0.0; } @@ -131,14 +133,14 @@ public: if (p[k] > 1.) p[k] = 1.; } - val0=sqrt(eigenVectors[0][0]*eigenVectors[0][0] + eigenVectors[0][1]*eigenVectors[0][1]); - a0=acos(abs(val0)) * CONST_180_PI; + val0=sqrt(static_cast<double>(eigenVectors[0][0]*eigenVectors[0][0]) + static_cast<double>(eigenVectors[0][1]*eigenVectors[0][1])); + a0=acos(vcl_abs(val0)) * CONST_180_PI; - val1=sqrt(eigenVectors[0][2]*eigenVectors[0][2] + eigenVectors[0][3]*eigenVectors[0][3]); - a1=acos(abs(val1)) * CONST_180_PI; + val1=sqrt(static_cast<double>(eigenVectors[0][2]*eigenVectors[0][2]) + static_cast<double>(eigenVectors[0][3]*eigenVectors[0][3])); + a1=acos(vcl_abs(val1)) * CONST_180_PI; - val2=sqrt(eigenVectors[0][4]*eigenVectors[0][4] + eigenVectors[0][5]*eigenVectors[0][5]); - a2=acos(abs(val2)) * CONST_180_PI; + val2=sqrt(static_cast<double>(eigenVectors[0][4]*eigenVectors[0][4]) + static_cast<double>(eigenVectors[0][5]*eigenVectors[0][5])); + a2=acos(vcl_abs(val2)) * CONST_180_PI; alpha=p[0]*a0 + p[1]*a1 + p[2]*a2; @@ -156,17 +158,18 @@ public: unsigned int GetOutputSize() { - return NumberOfComponentsPerPixel; + return m_NumberOfComponentsPerPixel; } /** Constructor */ - ReciprocalHAlphaFunctor() {} + ReciprocalHAlphaFunctor() : m_Epsilon(1e-4) {} /** Destructor */ - ~ReciprocalHAlphaFunctor() {} + virtual ~ReciprocalHAlphaFunctor() {} private: - itkStaticConstMacro(NumberOfComponentsPerPixel, unsigned int, 3); + itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 3); + const double m_Epsilon; }; } diff --git a/Code/SARPolarimetry/otbSinclairImageFilter.h b/Code/SARPolarimetry/otbSinclairImageFilter.h old mode 100644 new mode 100755 index 707f0184bf4960450e7fd3f7f3f1308cf2cc0227..6e10c46a379b86c210046cb28fd79f802634c24e --- a/Code/SARPolarimetry/otbSinclairImageFilter.h +++ b/Code/SARPolarimetry/otbSinclairImageFilter.h @@ -33,6 +33,16 @@ namespace otb * the type of the output image. It is also parameterized by the * operation to be applied, using a Functor style. * + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInputImageHH, class TInputImageHV, diff --git a/Code/SARPolarimetry/otbSinclairImageFilter.txx b/Code/SARPolarimetry/otbSinclairImageFilter.txx old mode 100644 new mode 100755 diff --git a/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h old mode 100644 new mode 100755 index 194f74e1459595e206b3101cec76f7227074da6a..5640fc6bff9aef6436124bb41f4d6a3118cbdf70 --- a/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h @@ -41,6 +41,15 @@ namespace Functor * channel #9 : \f$ S_{rr}.S_{rr}^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -57,18 +66,18 @@ public: TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); - ComplexType jShv = static_cast<ComplexType>(Shv) * vcl_complex<RealType>(0.0, 1.0); - ComplexType jSvh = static_cast<ComplexType>(Svh) * vcl_complex<RealType>(0.0, 1.0); - - ComplexType Sll = static_cast<ComplexType>( 0.5 * (-Shh-jShv-jSvh+Svv) ); - ComplexType Slr = static_cast<ComplexType>( 0.5 * (-Shh+jShv-jSvh+Svv) ); - ComplexType Srl = static_cast<ComplexType>( 0.5 * (-Shh-jShv+jSvh-Svv) ); - ComplexType Srr = static_cast<ComplexType>( 0.5 * (-Shh+jShv+jSvh+Svv) ); - - ComplexType conjSll = vcl_conj(Sll); - ComplexType conjSlr = vcl_conj(Slr); - ComplexType conjSrl = vcl_conj(Srl); - ComplexType conjSrr = vcl_conj(Srr); + const ComplexType jShv = static_cast<ComplexType>(Shv) * vcl_complex<RealType>(0.0, 1.0); + const ComplexType jSvh = static_cast<ComplexType>(Svh) * vcl_complex<RealType>(0.0, 1.0); + + const ComplexType Sll = static_cast<ComplexType>( 0.5 * (-Shh-jShv-jSvh+Svv) ); + const ComplexType Slr = static_cast<ComplexType>( 0.5 * (-Shh+jShv-jSvh+Svv) ); + const ComplexType Srl = static_cast<ComplexType>( 0.5 * (-Shh-jShv+jSvh-Svv) ); + const ComplexType Srr = static_cast<ComplexType>( 0.5 * (-Shh+jShv+jSvh+Svv) ); + + const ComplexType conjSll = vcl_conj(Sll); + const ComplexType conjSlr = vcl_conj(Slr); + const ComplexType conjSrl = vcl_conj(Srl); + const ComplexType conjSrr = vcl_conj(Srr); result[0] = static_cast<OutputValueType>( Sll * conjSll ); result[1] = static_cast<OutputValueType>( Sll * conjSlr ); diff --git a/Code/SARPolarimetry/otbSinclairToCoherencyFunctor.h b/Code/SARPolarimetry/otbSinclairToCoherencyFunctor.h old mode 100644 new mode 100755 index ea35f8717eb17c328b2b9a2cb515a43dde457cfe..cfbd6ca5b45404f1c47e6eba7c392215e638f815 --- a/Code/SARPolarimetry/otbSinclairToCoherencyFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCoherencyFunctor.h @@ -41,6 +41,15 @@ namespace Functor * channel #9 : \f$ j(S_{hv}-S_{vh}).(j(S_{hv}-S_{vh}))^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -58,10 +67,10 @@ public: result.SetSize(NumberOfComponentsPerPixel); - ComplexType HHPlusVV = static_cast<ComplexType>(Shh + Svv); - ComplexType VVMinusVV = static_cast<ComplexType>(Shh - Svv); - ComplexType HVPlusHV = static_cast<ComplexType>( Shv + Svh); - ComplexType jHVMinusHV = static_cast<ComplexType>( Shv - Svh) * vcl_complex<RealType>(0.0, 1.0); + const ComplexType HHPlusVV = static_cast<ComplexType>(Shh + Svv); + const ComplexType VVMinusVV = static_cast<ComplexType>(Shh - Svv); + const ComplexType HVPlusHV = static_cast<ComplexType>( Shv + Svh); + const ComplexType jHVMinusHV = static_cast<ComplexType>( Shv - Svh) * vcl_complex<RealType>(0.0, 1.0); result[0] = static_cast<OutputValueType>( HHPlusVV * vcl_conj(HHPlusVV) ); result[1] = static_cast<OutputValueType>( HHPlusVV * vcl_conj(VVMinusVV) ); diff --git a/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.h b/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.h old mode 100644 new mode 100755 index ed1229bb6fadfdf3a22e2a0e4e13943196a0fe0a..46034a4ffc1ea87a4b6e8efb120c82c6c7fd4547 --- a/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.h @@ -41,6 +41,15 @@ namespace Functor * channel #9 : \f$ S_{vv}.S_{vv}^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCoherencyFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -55,7 +64,7 @@ public: { TOutput result; - result.SetSize(NumberOfComponentsPerPixel); + result.SetSize(m_NumberOfComponentsPerPixel); result[0] = static_cast<OutputValueType>( static_cast<ComplexType>(Shh)*vcl_conj(static_cast<ComplexType>(Shh)) ); result[1] = static_cast<OutputValueType>( static_cast<ComplexType>(Shh)*vcl_conj(static_cast<ComplexType>(Shv)) ); @@ -73,7 +82,7 @@ public: unsigned int GetNumberOfComponentsPerPixel() { - return NumberOfComponentsPerPixel; + return m_NumberOfComponentsPerPixel; } /** Constructor */ @@ -86,7 +95,7 @@ protected: private: - itkStaticConstMacro(NumberOfComponentsPerPixel, unsigned int, 10); + itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 10); }; diff --git a/Code/SARPolarimetry/otbSinclairToMuellerFunctor.h b/Code/SARPolarimetry/otbSinclairToMuellerFunctor.h old mode 100644 new mode 100755 index 9bba7f5ac13607c85abeacfe23ad34f5d8ff16c5..275115bb16555546979d715d045293f94a465be2 --- a/Code/SARPolarimetry/otbSinclairToMuellerFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToMuellerFunctor.h @@ -29,7 +29,40 @@ namespace Functor * Elements of the Mueller matrix are extract from Antennas for radar and communications * Harold Mott p 503 * + * Output value are: + * channel #0 : \f$ 0.5 * \mathcal{Re}( T_{xx}.T_{xx}^{*} + T_{xy}.T_{xy}^{*} + T_{yx}.T_{yx}^{*} + T_{yy}.T_{yy}^{*} ) \f$ + * channel #1 : \f$ 0.5 * \mathcal{Re}( T_{xx}.T_{xx}^{*} - T_{xy}.T_{xy}^{*} + T_{yx}.T_{yx}^{*} - T_{yy}.T_{yy}^{*} ) \f$ + * channel #2 : \f$ \mathcal{Re}( T_{xx}.T_{xy}^{*} + T_{yx}.T_{yy}^{*} ) \f$ + * channel #3 : \f$ \mathcal{Im}( T_{xx}.T_{xy}^{*} + T_{yx}.T_{yy}^{*} ) \f$ + * channel #4 : \f$ 0.5 * \mathcal{Re}( T_{xx}.T_{xx}^{*} + T_{xy}.T_{xy}^{*} - T_{yx}.T_{yx}^{*} - T_{yy}.T_{yy}^{*} ) \f$ + * channel #5 : \f$ 0.5 * \mathcal{Re}( T_{xx}.T_{xx}^{*} - T_{xy}.T_{xy}^{*} - T_{yx}.T_{yx}^{*} + T_{yy}.T_{yy}^{*} ) \f$ + * channel #6 : \f$ \mathcal{Re}( T_{xx}.T_{xy}^{*} - T_{yx}.T_{yy}^{*} ) \f$ + * channel #7 : \f$ \mathcal{Im}( T_{xx}.T_{xy}^{*} - T_{yx}.T_{yy}^{*} ) \f$ + * channel #8 : \f$ \mathcal{Re}( T_{xx}.T_{yx}^{*} + T_{xy}.T_{yy}^{*} ) \f$ + * channel #9 : \f$ \mathcal{Im}( T_{xx}.T_{yx}^{*} - T_{xy}.T_{yy}^{*} ) \f$ + * channel #10 : \f$ \mathcal{Re}( T_{xx}.T_{yy}^{*} + T_{xy}.T_{yx}^{*} ) \f$ + * channel #11 : \f$ \mathcal{Im}( T_{xx}.T_{yy}^{*} - T_{xy}.T_{yx}^{*} ) \f$ + * channel #12 : \f$ \mathcal{Re}( T_{xx}.T_{yx}^{*} + T_{xy}.T_{yy}^{*} ) \f$ + * channel #13 : \f$ \mathcal{Im}( T_{xx}.T_{yx}^{*} - T_{xy}.T_{yy}^{*} ) \f$ + * channel #14 : \f$ \mathcal{Re}( T_{xx}.T_{yy}^{*} + T_{xy}.T_{yx}^{*} ) \f$ + * channel #15 : \f$ \mathcal{Im}( T_{xx}.T_{yy}^{*} - T_{xy}.T_{yx}^{*} ) \f$ + * + * With : + * \f$ T_{xx} = -S_{hh} \f$ + * \f$ T_{xy} = -S_{hv} \f$ + * \f$ T_{yx} = -S_{vh} \f$ + * \f$ T_{yy} = -S_{vv} \f$ + * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -48,15 +81,15 @@ public: result.SetSize(m_NumberOfComponentsPerPixel); - ComplexType Txx = static_cast<ComplexType>(-Shh); - ComplexType Txy = static_cast<ComplexType>(-Shv); - ComplexType Tyx = static_cast<ComplexType>(Svh); - ComplexType Tyy = static_cast<ComplexType>(Svv); + const ComplexType Txx = static_cast<ComplexType>(-Shh); + const ComplexType Txy = static_cast<ComplexType>(-Shv); + const ComplexType Tyx = static_cast<ComplexType>(Svh); + const ComplexType Tyy = static_cast<ComplexType>(Svv); - ComplexType conjTxx = vcl_conj(static_cast<ComplexType>(-Shh)); - ComplexType conjTxy = vcl_conj(static_cast<ComplexType>(-Shv)); - ComplexType conjTyx = vcl_conj(static_cast<ComplexType>(Svh)); - ComplexType conjTyy = vcl_conj(static_cast<ComplexType>(Svv)); + const ComplexType conjTxx = vcl_conj(static_cast<ComplexType>(-Shh)); + const ComplexType conjTxy = vcl_conj(static_cast<ComplexType>(-Shv)); + const ComplexType conjTyx = vcl_conj(static_cast<ComplexType>(Svh)); + const ComplexType conjTyy = vcl_conj(static_cast<ComplexType>(Svv)); result[0] = static_cast<OutputValueType>( 0.5 * (Txx*conjTxx + Txy*conjTxy + Tyx*conjTyx + Tyy*conjTyy).real() ); result[1] = static_cast<OutputValueType>( 0.5 * (Txx*conjTxx - Txy*conjTxy + Tyx*conjTyx - Tyy*conjTyy).real() ); @@ -70,8 +103,10 @@ public: result[9] = static_cast<OutputValueType>( (Txx*conjTyx - Txy*conjTyy).real() ); result[10] = static_cast<OutputValueType>( (Txx*conjTyy + Txy*conjTyx).real() ); result[11] = static_cast<OutputValueType>( (Txx*conjTyy - Txy*conjTyx).imag() ); + result[12] = static_cast<OutputValueType>( (conjTxx*Tyx + conjTxy*Tyy).imag() ); result[13] = static_cast<OutputValueType>( (conjTxx*Tyx - conjTxy*Tyy).imag() ); + result[14] = static_cast<OutputValueType>( (conjTxx*Tyy + conjTxy*Tyx).imag() ); result[15] = static_cast<OutputValueType>( (Txx*conjTyy - Txy*conjTyx).real() ); diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h old mode 100644 new mode 100755 index 6221350539eb6ae88a40fa70df390be7427c9139..8e55716a9685a66287bfd293818e8ccc0e306527 --- a/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h @@ -37,6 +37,15 @@ namespace Functor * channel #5 : \f$ S_{rr}.S_{rr}^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -53,15 +62,15 @@ public: TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); - ComplexType j2Shv = static_cast<ComplexType>(Shv) * vcl_complex<RealType>(0.0, 2.0); + const ComplexType j2Shv = static_cast<ComplexType>(Shv) * vcl_complex<RealType>(0.0, 2.0); - ComplexType Sll = static_cast<ComplexType>( 0.5 * (-Shh-j2Shv+Svv) ); - ComplexType Slr = static_cast<ComplexType>( 0.5 * (-Shh+Svv) ); - ComplexType Srr = vcl_conj(Sll); + const ComplexType Sll = static_cast<ComplexType>( 0.5 * (-Shh-j2Shv+Svv) ); + const ComplexType Slr = static_cast<ComplexType>( 0.5 * (-Shh+Svv) ); + const ComplexType Srr = vcl_conj(Sll); - ComplexType conjSll = vcl_conj(Sll); - ComplexType conjSlr = vcl_conj(Slr); - ComplexType conjSrr = vcl_conj(Srr); + const ComplexType conjSll = vcl_conj(Sll); + const ComplexType conjSlr = vcl_conj(Slr); + const ComplexType conjSrr = vcl_conj(Srr); result[0] = static_cast<OutputValueType>( Sll * conjSll ); result[1] = static_cast<OutputValueType>( Sll * conjSlr ); diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyFunctor.h old mode 100644 new mode 100755 index c668031a1536481038d78bd582eed38fa9369fdb..bee4f07fdf653f2bef783f99e5c4048c981c04fc --- a/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyFunctor.h @@ -37,6 +37,17 @@ namespace Functor * channel #5 : \f$ (2*S_{hv}).(2*S_{hv})^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCovarianceFunctor + + * \sa SinclairToReciprocalCovarianceFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> @@ -53,9 +64,9 @@ public: result.SetSize(NumberOfComponentsPerPixel); - ComplexType HHPlusVV = static_cast<ComplexType>(Shh + Svv); - ComplexType VVMinusVV = static_cast<ComplexType>(Shh - Svv); - ComplexType twoHV = static_cast<ComplexType>( 2.0 * Shv); + const ComplexType HHPlusVV = static_cast<ComplexType>(Shh + Svv); + const ComplexType VVMinusVV = static_cast<ComplexType>(Shh - Svv); + const ComplexType twoHV = static_cast<ComplexType>( 2.0 * Shv); result[0] = static_cast<OutputValueType>( HHPlusVV * vcl_conj(HHPlusVV) ); result[1] = static_cast<OutputValueType>( HHPlusVV * vcl_conj(VVMinusVV) ); diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.h old mode 100644 new mode 100755 index 5b8d8ebd7aee3d1fc049b0da18ee07aa1f6c2db4..3e9a1e9db6fee058fcc8354d65eaa3fab4cd9884 --- a/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.h @@ -37,6 +37,15 @@ namespace Functor * channel #5 : \f$ S_{vv}.S_{vv}^{*} \f$ * * \ingroup Functor + * \ingroup SARPolarimetry + * + * \sa SinclairImageFilter + * \sa SinclairToCircularCovarianceMatrixFunctor + * \sa SinclairToCoherencyFunctor + * \sa SinclairToCovarianceFunctor + * \sa SinclairToMuellerFunctor + * \sa SinclairToReciprocalCircularCovarianceMatrixFunctor + * \sa SinclairToReciprocalCoherencyFunctor */ template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput> diff --git a/Testing/Code/SARPolarimetry/CMakeLists.txt b/Testing/Code/SARPolarimetry/CMakeLists.txt old mode 100644 new mode 100755 index 80ac1101c4af3d95c36fed866662a3dfeb2a08a6..152de721dacaf9709033c8e880ebbaf840982ed7 --- a/Testing/Code/SARPolarimetry/CMakeLists.txt +++ b/Testing/Code/SARPolarimetry/CMakeLists.txt @@ -266,7 +266,7 @@ ADD_TEST(saTuReciprocalHAlphaImageFilterNew ${SARPOLARIMETRY_TESTS1} ADD_TEST(saTvReciprocalHAlphaImageFilter ${SARPOLARIMETRY_TESTS1} --compare-image ${EPSILON_12} ${BASELINE}/saTvReciprocalHAlphaImageFilter.tif ${TEMP}/saTvReciprocalHAlphaImageFilter.tif - otbHAlphaImageFilter + otbReciprocalHAlphaImageFilter ${INPUTDATA}/RSAT_imagery_HH.tif ${INPUTDATA}/RSAT_imagery_HV.tif ${INPUTDATA}/RSAT_imagery_HV.tif @@ -337,6 +337,10 @@ ADD_TEST(saTvMuellerToMLCImageFilter ${SARPOLARIMETRY_TESTS1} ${INPUTDATA}/RSAT_imagery_VV.tif ${TEMP}/saTvMuellerToMLCImageFilter.tif ) +# Hermitian eigen analysis class +ADD_TEST(saTvHermitianEigenAnalysisTest ${SARPOLARIMETRY_TESTS1} + otbHermitianEigenAnalysisTest +) # A enrichir SET(SARPOLARIMETRY_SRCS1 @@ -350,6 +354,7 @@ otbMultiChannelsPolarimetricSynthesisFilterNew.cxx otbMultiChannelsPolarimetricSynthesisFilter.cxx otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx otbSinclairToCovarianceFunctor.cxx +otbSinclairToReciprocalCovarianceFunctor.cxx otbSinclairImageFilter.cxx otbMLCToCoherencyImageFilterNew.cxx otbMLCToCoherencyImageFilter.cxx @@ -367,6 +372,7 @@ otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx otbMuellerToMLCImageFilterNew.cxx otbMuellerToMLCImageFilter.cxx +otbHermitianEigenAnalysisTest.cxx ) OTB_ADD_EXECUTABLE(otbSARPolarimetryTests1 "${SARPOLARIMETRY_SRCS1}" "OTBSARPolarimetry;OTBIO;OTBTesting") diff --git a/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbHermitianEigenAnalysisTest.cxx b/Testing/Code/SARPolarimetry/otbHermitianEigenAnalysisTest.cxx new file mode 100755 index 0000000000000000000000000000000000000000..3a111558ca201e4391e6083a31b70928eb9d63c1 --- /dev/null +++ b/Testing/Code/SARPolarimetry/otbHermitianEigenAnalysisTest.cxx @@ -0,0 +1,40 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#if defined(_MSC_VER) +#pragma warning ( disable : 4786 ) +#endif + +#include "itkExceptionObject.h" +#include <iostream> + +#include "otbImage.h" +#include "otbVectorImage.h" +#include "otbHermitianEigenAnalysis.h" + +int otbHermitianEigenAnalysisTest(int argc, char * argv[]) +{ + typedef vnl_matrix<double> MatrixType; + typedef std::vector<double> VectorType; + + + typedef otb::HermitianEigenAnalysis<MatrixType, VectorType> FilterType; + + FilterType filter; + + return EXIT_SUCCESS; +} diff --git a/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilterNew.cxx old mode 100644 new mode 100755 index c79e3ddd94d5ed353f394f9c2a5cafe05a0f9c5f..78669a68b07b24da7542b685fa6c1b170126a67a --- a/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilterNew.cxx @@ -37,7 +37,5 @@ int otbMLCToCircularCoherencyDegreeImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilterNew.cxx old mode 100644 new mode 100755 index 496e6b23599b7716da99a2eb1b030750eec1fc9f..70cd40313abda21f349016ea9c29938c5eb053c9 --- a/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilterNew.cxx @@ -37,7 +37,5 @@ int otbMLCToCoherencyDegreeImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilterNew.cxx old mode 100644 new mode 100755 index 96212610514e14f43d320dc27f7348b261e2f8fe..d07c6da4a8f1349d98549a6b623d8ea8d3971cb8 --- a/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilterNew.cxx @@ -37,7 +37,5 @@ int otbMLCToCoherencyImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilterNew.cxx old mode 100644 new mode 100755 index fa5c002d25bbd6bc1f36d666c4a0c096501c34d3..1b482a6bdf72f4331007ef17a5b80e902d772778 --- a/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilterNew.cxx @@ -36,7 +36,5 @@ int otbMuellerToCircularPolarisationImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx old mode 100644 new mode 100755 index da3ca7f311f4d2bb1453cbb83d142d0d5d4f1601..d533f1ed540bae4cca6f6c6ccebc281d6a615047 --- a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx @@ -38,7 +38,5 @@ int otbMuellerToMLCImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx old mode 100644 new mode 100755 index 18d94e90287a5a7b61c9e7c917a3e1cd6a405f66..f084149bd80a9674ae851e228645d1cedf4c17c7 --- a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx @@ -36,7 +36,5 @@ int otbMuellerToPolarisationDegreeAndPowerImageFilterNew(int argc, char * argv[] FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx old mode 100644 new mode 100755 index 95e195e45dc54bab87d072a9dbfa6c31837b7932..16ee6ce6077fc8ae897c2b18ecbb17f24467dd27 --- a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx @@ -39,7 +39,5 @@ int otbMultiChannelsPolarimetricSynthesisFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx old mode 100644 new mode 100755 index 8db9eb8bc049c2dcdabdcbcf01152a7a72c1e0d4..718e186083e9dc248b050fedae5eb0d5e0857936 --- a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx @@ -40,7 +40,5 @@ int otbPolarimetricSynthesisFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilterNew.cxx old mode 100644 new mode 100755 index 7dbcfcc1a8e98ec9306d1985f1bdbb9352f67d64..47bef8d8d91b9e1a641ecd0ef4ec86b5617c6a80 --- a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilterNew.cxx @@ -36,7 +36,5 @@ int otbReciprocalCoherencyToMuellerImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx old mode 100644 new mode 100755 index 4cb17b6f32b6c4234267e4664c6a309b38697dd8..4f1e94be9a82f5e23dbb6a779a3034085cb5c16c --- a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx @@ -36,7 +36,5 @@ int otbReciprocalHAlphaImageFilterNew(int argc, char * argv[]) FilterType::Pointer filter = FilterType::New(); - std::cout << filter << std::endl; - return EXIT_SUCCESS; } diff --git a/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx b/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx old mode 100644 new mode 100755 index 7dde2e00eea997d2b9b69a36251266d33a712384..95724e8111ca37c1f5c0a4a3114371186c663c90 --- a/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx +++ b/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx @@ -35,6 +35,7 @@ void RegisterTests() REGISTER_TEST(otbMultiChannelsPolarimetricSynthesisFilter); REGISTER_TEST(otbVectorMultiChannelsPolarimetricSynthesisFilter); REGISTER_TEST(otbSinclairToReciprocalCovarianceFunctor); + REGISTER_TEST(otbSinclairToCovarianceFunctor); REGISTER_TEST(otbSinclairImageFilter); REGISTER_TEST(otbMLCToCoherencyImageFilterNew); REGISTER_TEST(otbMLCToCoherencyImageFilter); @@ -52,4 +53,5 @@ void RegisterTests() REGISTER_TEST(otbMuellerToPolarisationDegreeAndPowerImageFilter); REGISTER_TEST(otbMuellerToMLCImageFilterNew); REGISTER_TEST(otbMuellerToMLCImageFilter); + REGISTER_TEST(otbHermitianEigenAnalysisTest); } diff --git a/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx b/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx old mode 100644 new mode 100755 index 830fc9aecc1dcb4012ca7a4523492ccadcff7d51..db4b78440364180e540fb6c78f6f4a787246e6c3 --- a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx +++ b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx @@ -17,27 +17,31 @@ =========================================================================*/ #include "itkExceptionObject.h" -#include "otbSinclairToReciprocalCovarianceFunctor.h" +#include "otbSinclairToCovarianceFunctor.h" #include "itkVariableLengthVector.h" -int otbSinclairToReciprocalCovarianceFunctor(int argc, char * argv[]) +int otbSinclairToCovarianceFunctor(int argc, char * argv[]) { typedef std::complex<double> ScalarType; typedef itk::VariableLengthVector<ScalarType> OutputType; - typedef otb::Functor::SinclairToReciprocalCovarianceFunctor<ScalarType, ScalarType, + typedef otb::Functor::SinclairToCovarianceFunctor<ScalarType, ScalarType, ScalarType, ScalarType, OutputType > FunctorType; - OutputType result(6); + OutputType result(10); FunctorType funct; OutputType outputFunct; result[0] = 1.0; result[1] = 0.0; - result[2] = 1.0; - result[3] = 0.0; + result[2] = 0.0; + result[3] = 1.0; result[4] = 0.0; - result[5] = 1.0; + result[5] = 0.0; + result[6] = 0.0; + result[7] = 0.0; + result[8] = 0.0; + result[9] = 1.0; outputFunct = funct.operator ()( 1.0, 0.0, 0.0, 1.0); @@ -46,7 +50,11 @@ int otbSinclairToReciprocalCovarianceFunctor(int argc, char * argv[]) vcl_abs(result[2]-outputFunct[2]) > 1e-10 || vcl_abs(result[3]-outputFunct[3]) > 1e-10 || vcl_abs(result[4]-outputFunct[4]) > 1e-10 || - vcl_abs(result[5]-outputFunct[5]) > 1e-10) + vcl_abs(result[5]-outputFunct[5]) > 1e-10 || + vcl_abs(result[6]-outputFunct[6]) > 1e-10 || + vcl_abs(result[7]-outputFunct[7]) > 1e-10 || + vcl_abs(result[8]-outputFunct[8]) > 1e-10 || + vcl_abs(result[9]-outputFunct[9]) > 1e-10) { return EXIT_FAILURE; } diff --git a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.cxx new file mode 100755 index 0000000000000000000000000000000000000000..830fc9aecc1dcb4012ca7a4523492ccadcff7d51 --- /dev/null +++ b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceFunctor.cxx @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "itkExceptionObject.h" + +#include "otbSinclairToReciprocalCovarianceFunctor.h" +#include "itkVariableLengthVector.h" + +int otbSinclairToReciprocalCovarianceFunctor(int argc, char * argv[]) +{ + typedef std::complex<double> ScalarType; + typedef itk::VariableLengthVector<ScalarType> OutputType; + + typedef otb::Functor::SinclairToReciprocalCovarianceFunctor<ScalarType, ScalarType, + ScalarType, ScalarType, OutputType > FunctorType; + + OutputType result(6); + FunctorType funct; + OutputType outputFunct; + + result[0] = 1.0; + result[1] = 0.0; + result[2] = 1.0; + result[3] = 0.0; + result[4] = 0.0; + result[5] = 1.0; + + outputFunct = funct.operator ()( 1.0, 0.0, 0.0, 1.0); + + if( vcl_abs(result[0]-outputFunct[0]) > 1e-10 || + vcl_abs(result[1]-outputFunct[1]) > 1e-10 || + vcl_abs(result[2]-outputFunct[2]) > 1e-10 || + vcl_abs(result[3]-outputFunct[3]) > 1e-10 || + vcl_abs(result[4]-outputFunct[4]) > 1e-10 || + vcl_abs(result[5]-outputFunct[5]) > 1e-10) + { + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755 diff --git a/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx old mode 100644 new mode 100755