diff --git a/Modules/Applications/AppSARPolarMatrixConvert/app/otbSARPolarMatrixConvert.cxx b/Modules/Applications/AppSARPolarMatrixConvert/app/otbSARPolarMatrixConvert.cxx index 270134521e2da3577c5f270549ada372913d6a09..2352b4fe81a5d83a3be8f54233c2e2f19e76d48b 100644 --- a/Modules/Applications/AppSARPolarMatrixConvert/app/otbSARPolarMatrixConvert.cxx +++ b/Modules/Applications/AppSARPolarMatrixConvert/app/otbSARPolarMatrixConvert.cxx @@ -21,9 +21,6 @@ #include "otbWrapperApplication.h" #include "otbWrapperApplicationFactory.h" -// Polarimetric filters -#include "otbPolarimetricFilters.h" - #include "otbSinclairToCoherencyMatrixImageFilter.h" #include "otbSinclairToCovarianceMatrixImageFilter.h" #include "otbSinclairToCircularCovarianceMatrixImageFilter.h" @@ -36,6 +33,11 @@ #include "otbMuellerToReciprocalCovarianceImageFilter.h" #include "otbMuellerToPolarisationDegreeAndPowerImageFilter.h" +#include "otbReciprocalCoherencyToReciprocalMuellerImageFilter.h" +#include "otbReciprocalCovarianceToCoherencyDegreeImageFilter.h" +#include "otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h" +#include "otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h" + namespace otb { namespace Wrapper diff --git a/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h b/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h deleted file mode 100644 index 4147b9c0a421571497701ab4ca2530f8384fdc68..0000000000000000000000000000000000000000 --- a/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef otbPolarimetricFilters_h -#define otbPolarimetricFilters_h - -// Generic polarimetry functors -#include "otbPolarimetryTags.h" -#include "otbFunctorImageFilter.h" - -// Other reciprocal filters -#include "otbReciprocalCoherencyToReciprocalMuellerFunctor.h" -#include "otbReciprocalCovarianceToCoherencyDegreeFunctor.h" -#include "otbReciprocalCovarianceToReciprocalCoherencyFunctor.h" -#include "otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor.h" - -namespace otb -{ -//######################### -// Other reciprocal filters -//######################### - -// This is the entire declaration of ReciprocalCoherencyToReciprocalMuellerImageFilter -template <typename TInputImage, typename TOutputImage> -using ReciprocalCoherencyToReciprocalMuellerImageFilter = - FunctorImageFilter<Functor:: - ReciprocalCoherencyToReciprocalMuellerFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; - -// This is the entire declaration of ReciprocalCovarianceToCoherencyDegreeImageFilter -template <typename TInputImage, typename TOutputImage> -using ReciprocalCovarianceToCoherencyDegreeImageFilter = - FunctorImageFilter<Functor::ReciprocalCovarianceToCoherencyDegreeFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; - -// This is the entire declaration of ReciprocalCovarianceToReciprocalCoherencyImageFilter -template <typename TInputImage, typename TOutputImage> -using ReciprocalCovarianceToReciprocalCoherencyImageFilter = - FunctorImageFilter<Functor::ReciprocalCovarianceToReciprocalCoherencyFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; - -// This is the entire declaration of ReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter -template <typename TInputImage, typename TOutputImage> -using ReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter = - FunctorImageFilter<Functor::ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; - -} // end namespace otb - -#endif diff --git a/Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerFunctor.h b/Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerImageFilter.h similarity index 82% rename from Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerFunctor.h rename to Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerImageFilter.h index da536a04b8ab6ae01ac62e596c5b94af3116c657..c2a7ba88b649e27521eeacb81ec942b22c84d71b 100644 --- a/Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbReciprocalCoherencyToReciprocalMuellerImageFilter.h @@ -19,8 +19,10 @@ */ -#ifndef otbReciprocalCoherencyToReciprocalMuellerFunctor_h -#define otbReciprocalCoherencyToReciprocalMuellerFunctor_h +#ifndef otbReciprocalCoherencyToReciprocalMuellerImageFilter_h +#define otbReciprocalCoherencyToReciprocalMuellerImageFilter_h + +#include "otbFunctorImageFilter.h" namespace otb { @@ -63,6 +65,9 @@ namespace Functor { * The output pixel has 16 channels * Element are stored from left to right, line by line. * + * Use otb::ReciprocalCoherencyToReciprocalMuellerImageFilter to apply + * it to an image. + * * \ingroup SARPolarimetry * * @@ -109,14 +114,26 @@ public: // Size of the reciprocal mueller matrix return 16; } - - /** Constructor */ - ReciprocalCoherencyToReciprocalMuellerFunctor() {} - - /** Destructor */ - virtual ~ReciprocalCoherencyToReciprocalMuellerFunctor() {} }; } // end namespace functor + + /** + * \typedef ReciprocalCoherencyToReciprocalMuellerImageFilter + * \brief Applies otb::Functor::ReciprocalCoherencyToReciprocalMuellerFunctor + * \sa otb::Functor::ReciprocalCoherencyToReciprocalMuellerFunctor + * + * Set inputs with: + * \code + * SetVariadicInput<0>(inputPtr); + * \endcode + * + * \ingroup OTBPolarimetry + */ + template <typename TInputImage, typename TOutputImage> +using ReciprocalCoherencyToReciprocalMuellerImageFilter = + FunctorImageFilter<Functor:: + ReciprocalCoherencyToReciprocalMuellerFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; + } // end namespace otb #endif diff --git a/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeFunctor.h b/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeImageFilter.h similarity index 80% rename from Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeFunctor.h rename to Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeImageFilter.h index f8b0ca652c2718a418b70d655587a169cd8505b8..cacd3769e201e77f7b92ccc830ab3ed37434c59d 100644 --- a/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToCoherencyDegreeImageFilter.h @@ -19,8 +19,10 @@ */ -#ifndef otbReciprocalCovarianceToCoherencyDegreeFunctor_h -#define otbReciprocalCovarianceToCoherencyDegreeFunctor_h +#ifndef otbReciprocalCovarianceToCoherencyDegreeImageFilter_h +#define otbReciprocalCovarianceToCoherencyDegreeImageFilter_h + +#include "otbFunctorImageFilter.h" namespace otb { @@ -92,17 +94,26 @@ public: // Size of the result return 3; } - - /** Constructor */ - ReciprocalCovarianceToCoherencyDegreeFunctor() {} - - /** Destructor */ - virtual ~ReciprocalCovarianceToCoherencyDegreeFunctor() {} - private: static constexpr double m_Epsilon = 1e-6; }; } // end namespace functor + + /** + * \typedef ReciprocalCovarianceToCoherencyDegreeImageFilter + * \brief Applies otb::Functor::ReciprocalCovarianceToCoherencyDegreeFunctor + * \sa otb::Functor::ReciprocalCovarianceToCoherencyDegreeFunctor + * + * Set inputs with: + * \code + * SetVariadicInput<0>(inputPtr); + * \endcode + * + * \ingroup OTBPolarimetry + */ + template <typename TInputImage, typename TOutputImage> +using ReciprocalCovarianceToCoherencyDegreeImageFilter = + FunctorImageFilter<Functor::ReciprocalCovarianceToCoherencyDegreeFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; } // end namespace otb #endif diff --git a/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyFunctor.h b/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h similarity index 92% rename from Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyFunctor.h rename to Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h index 905a444cea2eb9f33c826bff1ecb8cf8ca46a22d..6158c397c9d83da0744933c62c62c726628c0af1 100644 --- a/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h @@ -19,8 +19,8 @@ */ -#ifndef otbReciprocalCovarianceToReciprocalCoherencyFunctor_h -#define otbReciprocalCovarianceToReciprocalCoherencyFunctor_h +#ifndef otbReciprocalCovarianceToReciprocalCoherencyImageFilter_h +#define otbReciprocalCovarianceToReciprocalCoherencyImageFilter_h #include "otbFunctorImageFilter.h" @@ -46,7 +46,7 @@ namespace Functor { * \ingroup Functor * \ingroup SARPolarimetry * - * Use ReciprocalCovarianceToReciprocalCoherencyImageFilter to apply + * Use otbReciprocalCovarianceToReciprocalCoherencyImageFilter to apply * it to an image. * * \sa CovarianceToCircularCoherencyDegreeImageFilter @@ -97,7 +97,11 @@ public: * \brief Applies ReciprocalCovarianceToReciprocalCoherencyFunctor * \sa ReciprocalCovarianceToReciprocalCoherencyFunctor * - * Set input with SetVariadicInput<0>(inputPtr); + * Set inputs with: + * \code + * SetVariadicInput<0>(inputPtr); + * \endcode + * * */ template <typename TInputImage, typename TOutputImage> diff --git a/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor.h b/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h similarity index 84% rename from Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor.h rename to Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h index 0e23399484754fec92c47ecd6c984e93e0242e90..d82174871532cded750b9f4873a6cc1b7ba18988 100644 --- a/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h @@ -19,10 +19,10 @@ */ -#ifndef otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor_h -#define otbReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor_h +#ifndef otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter_h +#define otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter_h -#include "itkUnaryFunctorImageFilter.h" +#include "otbFunctorImageFilter.h" #include <complex> namespace otb @@ -92,15 +92,25 @@ public: // Size of the result (entropy, alpha, anisotropy) return 6; } - - /** Constructor */ - ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor() {} - - /** Destructor */ - virtual ~ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor() {} }; } // end namespace functor + /** + * \typedef ReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter + * \brief Applies otb::Functor::ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor + * \sa otb::Functor::ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor + * + * Set inputs with: + * \code + * SetVariadicInput<0>(inputPtr); + * \endcode + * + * \ingroup OTBPolarimetry + */ + template <typename TInputImage, typename TOutputImage> +using ReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter = + FunctorImageFilter<Functor::ReciprocalLinearCovarianceToReciprocalCircularCovarianceFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>; + } // end namespace otb #endif diff --git a/Modules/Filtering/Polarimetry/test/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx b/Modules/Filtering/Polarimetry/test/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx index 51853ff9211464a645d763b6bb1c91c84377e129..beab537f2368bbf9d6884a30d9eab620fa3e3ae9 100644 --- a/Modules/Filtering/Polarimetry/test/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx @@ -26,7 +26,7 @@ #include "otbVectorImage.h" #include "otbImageFileReader.h" #include "otbImageFileWriter.h" -#include "otbPolarimetricFilters.h" +#include "otbReciprocalCoherencyToReciprocalMuellerImageFilter.h" int otbReciprocalCoherencyToReciprocalMuellerImageFilter(int itkNotUsed(argc), char * argv[]) diff --git a/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx b/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx index 26dad68e3a0853310c3094de7c27804fe5e22ebb..c2d1085ad45a187cec62b4856cfca524b167bc97 100644 --- a/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx @@ -26,7 +26,7 @@ #include "otbVectorImage.h" #include "otbImageFileReader.h" #include "otbImageFileWriter.h" -#include "otbPolarimetricFilters.h" +#include "otbReciprocalCovarianceToCoherencyDegreeImageFilter.h" int otbReciprocalCovarianceToCoherencyDegreeImageFilter(int itkNotUsed(argc), char * argv[]) { diff --git a/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx b/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx index b5885f94c58a5156d288ae6ba560e249218883c6..cd2ccb5299ceb3e86de0cac48c84a988541ab312 100644 --- a/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx @@ -25,7 +25,7 @@ #include "otbVectorImage.h" #include "otbImageFileReader.h" #include "otbImageFileWriter.h" -#include "otbPolarimetricFilters.h" +#include "otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h" int otbReciprocalCovarianceToReciprocalCoherencyImageFilter(int itkNotUsed(argc), char * argv[]) diff --git a/Modules/Filtering/Polarimetry/test/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx b/Modules/Filtering/Polarimetry/test/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx index 2a242e44f6b3a847aac3fd9c72c3504de68c2042..599ac04b843504e6279164209149682ca1d85729 100644 --- a/Modules/Filtering/Polarimetry/test/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx @@ -25,7 +25,7 @@ #include "otbVectorImage.h" #include "otbImageFileReader.h" #include "otbImageFileWriter.h" -#include "otbPolarimetricFilters.h" +#include "otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h" int otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter(int itkNotUsed(argc), char * argv[]) { diff --git a/Modules/Filtering/Polarimetry/test/otbSinclairReciprocalImageFilter.cxx b/Modules/Filtering/Polarimetry/test/otbSinclairReciprocalImageFilter.cxx index d2c2d541487b58f7983a16b073ce1a4af4f2f7ef..dd59d0a41bdb72904045888ece63656eb7461531 100644 --- a/Modules/Filtering/Polarimetry/test/otbSinclairReciprocalImageFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbSinclairReciprocalImageFilter.cxx @@ -25,8 +25,6 @@ #include "otbImageFileReader.h" #include "otbImageFileWriter.h" -#include "otbPolarimetricFilters.h" - #include "otbMultiChannelExtractROI.h" #include "otbSinclairToReciprocalCoherencyMatrixImageFilter.h"