Commit 1fdea835 authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: move bistatic filters in separate files

parent fe742a18
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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>>;
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment