diff --git a/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h b/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h index e6ffc96ea8c0ae51755c4e9d18c35109ca86f486..367627599de9b3a7fa7d0d2fa257b2a7ed4585ee 100644 --- a/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h +++ b/Modules/Filtering/Polarimetry/include/otbPolarimetricFilters.h @@ -54,37 +54,6 @@ namespace otb { -//################# -// Bistatic filters -//################# - -// This is the entire declaration of SinclairToCovarianceMatrixFilter -template <typename TInputImage, typename TOutputImage> -using SinclairToCovarianceMatrixFilter = FunctorImageFilter< - Functor::SinclairToCovarianceMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, - typename TInputImage::PixelType, typename TOutputImage::PixelType>, - std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; - -// This is the entire declaration of SinclairToCircularCovarianceMatrixFilter -template <typename TInputImage, typename TOutputImage> -using SinclairToCircularCovarianceMatrixFilter = FunctorImageFilter< - Functor::SinclairToCircularCovarianceMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, - typename TInputImage::PixelType, typename TOutputImage::PixelType>, - std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; - -// This is the entire declaration of SinclairToCoherencyMatrixFilter -template <typename TInputImage, typename TOutputImage> -using SinclairToCoherencyMatrixFilter = FunctorImageFilter< - Functor::SinclairToCoherencyMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, - typename TInputImage::PixelType, typename TOutputImage::PixelType>, - std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; - -// This is the entire declaration of SinclairToMuellerMatrixFilter -template <typename TInputImage, typename TOutputImage> -using SinclairToMuellerMatrixFilter = FunctorImageFilter< - Functor::SinclairToMuellerMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, - typename TInputImage::PixelType, typename TOutputImage::PixelType>, - std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; //################### // Monostatic filters diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h index da67daeb39a877ee785ee7577d3e819f2baad6fc..0984c6a9c83b28b09ed8be9ac81242cef90f3d05 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h @@ -18,11 +18,14 @@ * limitations under the License. */ -#ifndef otbSinclairToCircularCovarianceMatrixFunctor_h -#define otbSinclairToCircularCovarianceMatrixFunctor_h +#ifndef otbSinclairToCircularCovarianceMatrixImageFilter_h +#define otbSinclairToCircularCovarianceMatrixImageFilter_h #include <complex> + #include "otbSinclairToCovarianceMatrixFunctor.h" +#include "otbFunctorImageFilter.h" +#include "otbPolarimetryTags.h" namespace otb { @@ -55,6 +58,8 @@ namespace Functor * The output pixel has 10 channels : the diagonal and the upper element of the matrix. * Element are stored from left to right, line by line. * + * Use otb::SinclairToCircularCovarianceMatrixImageFilter to apply it to an image. + * * \ingroup Functor * \ingroup SARPolarimetry * @@ -80,7 +85,7 @@ public: typedef typename TOutput::ValueType OutputValueType; typedef SinclairToCovarianceMatrixFunctor<ComplexType, ComplexType, ComplexType, ComplexType, TOutput> SinclairToCovarianceFunctorType; inline void operator ()(TOutput & result, const TInput1& Shh, const TInput2& Shv, - const TInput3& Svh, const TInput4& Svv) + const TInput3& Svh, const TInput4& Svv) const { const ComplexType S_hh = static_cast<ComplexType>(Shh); const ComplexType S_hv = static_cast<ComplexType>(Shv); @@ -117,6 +122,29 @@ public: }; } // namespace Functor + + /** + * \typedef SinclairToCircularCovarianceMatrixImageFilter + * \brief Applies otb::Functor::SinclairToCircularCovarianceMatrixFunctor + * \sa otb::Functor::SinclairToCircularCovarianceMatrixFunctor + * + * Set inputs with: + * \code + * + * SetVariadicNamedInput<polarimetry_tags::hh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::hv>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vv>(inputPtr); + * + * \endcode + * + * \ingroup OTBPolarimetry + */ + template <typename TInputImage, typename TOutputImage> +using SinclairToCircularCovarianceMatrixImageFilter = FunctorImageFilter< + Functor::SinclairToCircularCovarianceMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, + typename TInputImage::PixelType, typename TOutputImage::PixelType>, + std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; } // namespace otb #endif diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h index 6356266ab33091a04ecf637b3520df0555d3d67f..ac39c5f74161b02a49811d996d28bcfb9afe5e9f 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCoherencyMatrixFunctor.h @@ -18,10 +18,12 @@ * limitations under the License. */ -#ifndef otbSinclairToCoherencyMatrixFunctor_h -#define otbSinclairToCoherencyMatrixFunctor_h +#ifndef otbSinclairToCoherencyMatrixImageFilter_h +#define otbSinclairToCoherencyMatrixImageFilter_h #include <complex> +#include "otbFunctorImageFilter.h" +#include "otbPolarimetryTags.h" namespace otb { @@ -46,6 +48,8 @@ namespace Functor * The output pixel has 10 channels : the diagonal and the upper element of the matrix. * Element are stored from left to right, line by line. * + * Use otb::SinclairToCoherencyMatrixImageFilter to apply it to an image. + * * \ingroup Functor * \ingroup SARPolarimetry * @@ -70,7 +74,7 @@ public: typedef std::complex <RealType> ComplexType; typedef typename TOutput::ValueType OutputValueType; inline void operator ()(TOutput & result, const TInput1& Shh, const TInput2& Shv, - const TInput3& Svh, const TInput4& Svv) + const TInput3& Svh, const TInput4& Svv) const { const ComplexType S_hh = static_cast<ComplexType>(Shh); const ComplexType S_hv = static_cast<ComplexType>(Shv); @@ -110,6 +114,29 @@ public: }; } // namespace Functor + + /** + * \typedef SinclairToCoherencyMatrixImageFilter + * \brief Applies otb::Functor::SinclairToCoherencyMatrixFunctor + * \sa otb::Functor::SinclairToCoherencyMatrixFunctor + * + * Set inputs with: + * \code + * + * SetVariadicNamedInput<polarimetry_tags::hh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::hv>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vv>(inputPtr); + * + * \endcode + * + * \ingroup OTBPolarimetry + */ + template <typename TInputImage, typename TOutputImage> +using SinclairToCoherencyMatrixImageFilter = FunctorImageFilter< + Functor::SinclairToCoherencyMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, + typename TInputImage::PixelType, typename TOutputImage::PixelType>, + std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; } // namespace otb #endif diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h index 1fc404172f7444cfb3cc72094ffd52bdfac459d4..982090a904b5303ccda782e28377a71f17b766c6 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCovarianceMatrixFunctor.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#ifndef otbSinclairToCovarianceMatrixFunctor_h -#define otbSinclairToCovarianceMatrixFunctor_h +#ifndef otbSinclairToCovarianceMatrixImageFilter_h +#define otbSinclairToCovarianceMatrixImageFilter_h #include <complex> #include "otbFunctorImageFilter.h" @@ -48,7 +48,7 @@ namespace Functor * The output pixel has 10 channels : the diagonal and the upper element of the matrix. * Element are stored from left to right, line by line. * - * Use otb::SinclairToCovarianceMatrixFilter to apply + * Use otb::SinclairToCovarianceMatrixImageFilter to apply * it to an image. * * \ingroup Functor @@ -101,7 +101,7 @@ public: } // namespace Functor /** - * \typedef SinclairToCovarianceMatrixFilter + * \typedef SinclairToCovarianceMatrixImageFilter * \brief Applies otb::Functor::SinclairToCovarianceMatrixFunctor * \sa otb::Functor::SinclairToCovarianceMatrixFunctor * @@ -118,7 +118,7 @@ public: * \ingroup OTBPolarimetry */ template <typename TInputImage, typename TOutputImage> - using SinclairToCovarianceMatrixFilter = FunctorImageFilter< + using SinclairToCovarianceMatrixImageFilter = FunctorImageFilter< Functor::SinclairToCovarianceMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, typename TOutputImage::PixelType>, std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h index 1744067128b761900641a938a6549672c7014a7b..3284358a07d901b508fb812c2603ccf4b2907583 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToMuellerMatrixFunctor.h @@ -18,10 +18,12 @@ * limitations under the License. */ -#ifndef otbSinclairToMuellerMatrixFunctor_h -#define otbSinclairToMuellerMatrixFunctor_h +#ifndef otbSinclairToMuellerMatrixImageFilter_h +#define otbSinclairToMuellerMatrixImageFilter_h #include <complex> +#include "otbFunctorImageFilter.h" +#include "otbPolarimetryTags.h" namespace otb { @@ -65,6 +67,7 @@ namespace Functor * {channel #12}&{channel #13}&{channel #14}&{channel #15} \\ * \end{pmatrix} \f$ * + * Use otb::otbSinclairToMuellerMatrixImageFilter to apply it to an image. * \ingroup Functor * \ingroup SARPolarimetry * @@ -90,7 +93,7 @@ public: typedef double RealType; inline void operator ()(TOutput & result, const TInput1& Shh, const TInput2& Shv, - const TInput3& Svh, const TInput4& Svv) + const TInput3& Svh, const TInput4& Svv) const { const ComplexType Txx = static_cast<ComplexType>(-Shh); const ComplexType Txy = static_cast<ComplexType>(-Shv); @@ -134,6 +137,30 @@ public: }; } // namespace Functor + +/** + * \typedef SinclairToMuellerMatrixImageFilter + * \brief Applies otb::Functor::SinclairToMuellerMatrixFunctor + * \sa otb::Functor::SinclairToCircularCovarianceMatrixFunctor + * + * Set inputs with: + * \code + * + * SetVariadicNamedInput<polarimetry_tags::hh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::hv>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vh>(inputPtr); + * SetVariadicNamedInput<polarimetry_tags::vv>(inputPtr); + * + * \endcode + * + * \ingroup OTBPolarimetry + */ +template <typename TInputImage, typename TOutputImage> +using SinclairToMuellerMatrixImageFilter = FunctorImageFilter< + Functor::SinclairToMuellerMatrixFunctor<typename TInputImage::PixelType, typename TInputImage::PixelType, typename TInputImage::PixelType, + typename TInputImage::PixelType, typename TOutputImage::PixelType>, + std::tuple<polarimetry_tags::hh, polarimetry_tags::hv, polarimetry_tags::vh, polarimetry_tags::vv>>; + } // namespace otb #endif