Commit d0e09b58 authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: remove GetOutputSize method and NumberOfComponentsPerPixel attribute from polar functors

parent cef912b1
......@@ -170,11 +170,6 @@ public:
result[3] = l_PolarisationDegreeMax;
}
unsigned int GetOutputSize()
{
return m_NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the result
......@@ -182,13 +177,12 @@ public:
}
/** Constructor */
MuellerToPolarisationDegreeAndPowerFunctor() : m_NumberOfComponentsPerPixel(4), m_Epsilon(1e-6), m_PI_90(2*CONST_PI_180) {}
MuellerToPolarisationDegreeAndPowerFunctor() : m_Epsilon(1e-6), m_PI_90(2*CONST_PI_180) {}
/** Destructor */
virtual ~MuellerToPolarisationDegreeAndPowerFunctor() {}
private:
unsigned int m_NumberOfComponentsPerPixel;
const double m_Epsilon;
const double m_PI_90;
};
......
......@@ -19,10 +19,9 @@
*/
#ifndef otbReciprocalBarnesDecompImageFilter_h
#define otbReciprocalBarnesDecompImageFilter_h
#ifndef otbReciprocalBarnesDecompFunctor_h
#define otbReciprocalBarnesDecompFunctor_h
#include "otbUnaryFunctorImageFilter.h"
#include "otbMath.h"
#include "vnl/algo/vnl_complex_eigensystem.h"
#include <algorithm>
......@@ -97,11 +96,6 @@ public:
result[8] = static_cast<OutputValueType>(ki[2][0]);
}
unsigned int GetOutputSize()
{
return m_NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the result
......@@ -115,7 +109,6 @@ public:
virtual ~ReciprocalBarnesDecompFunctor() {}
private:
itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 9);
const double m_Epsilon;
};
} // end namespace functor
......
......@@ -19,10 +19,9 @@
*/
#ifndef otbReciprocalHAlphaImageFilter_h
#define otbReciprocalHAlphaImageFilter_h
#ifndef otbReciprocalHAlphaFunctor_h
#define otbReciprocalHAlphaFunctor_h
#include "otbUnaryFunctorImageFilter.h"
#include "otbMath.h"
#include "vnl/algo/vnl_complex_eigensystem.h"
#include <algorithm>
......@@ -177,7 +176,6 @@ public:
virtual ~ReciprocalHAlphaFunctor() {}
private:
itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 3);
static constexpr double m_Epsilon = 1e-6;
};
} // end namespace functor
......
......@@ -19,8 +19,8 @@
*/
#ifndef otbReciprocalHuynenDecompImageFilter_h
#define otbReciprocalHuynenDecompImageFilter_h
#ifndef otbReciprocalHuynenDecompFunctor_h
#define otbReciprocalHuynenDecompFunctor_h
namespace otb
{
......@@ -64,11 +64,6 @@ public:
result[8] = H;
}
unsigned int GetOutputSize()
{
return m_NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the result
......@@ -82,7 +77,6 @@ public:
virtual ~ReciprocalHuynenDecompFunctor() {}
private:
itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 9);
const double m_Epsilon;
};
} // end namespace functor
......
......@@ -19,8 +19,8 @@
*/
#ifndef otbReciprocalPauliDecompImageFilter_h
#define otbReciprocalPauliDecompImageFilter_h
#ifndef otbReciprocalPauliDecompFunctor_h
#define otbReciprocalPauliDecompFunctor_h
namespace otb
{
......@@ -55,11 +55,6 @@ public:
result[2] = sqrt2*Shv;
}
unsigned int GetOutputSize()
{
return m_NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the result
......@@ -67,14 +62,13 @@ public:
}
/** Constructor */
ReciprocalPauliDecompFunctor() : m_Epsilon(1e-6) {}
ReciprocalPauliDecompFunctor() : {}
/** Destructor */
virtual ~ReciprocalPauliDecompFunctor() {}
private:
itkStaticConstMacro(m_NumberOfComponentsPerPixel, unsigned int, 3);
const double m_Epsilon;
static constexpr double m_Epsilon = 1e-6;
};
} // end namespace functor
} // end namespace otb
......
......@@ -91,11 +91,6 @@ public:
funct(result, Sll, Slr, Srr);
}
unsigned int GetNumberOfComponentsPerPixel()
{
return m_NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the matrix
......@@ -103,16 +98,10 @@ public:
}
/** Constructor */
SinclairToReciprocalCircularCovarianceMatrixFunctor() : m_NumberOfComponentsPerPixel(6) {}
SinclairToReciprocalCircularCovarianceMatrixFunctor() : {}
/** Destructor */
virtual ~SinclairToReciprocalCircularCovarianceMatrixFunctor() {}
protected:
private:
unsigned int m_NumberOfComponentsPerPixel;
};
} // namespace Functor
......
......@@ -70,8 +70,6 @@ public:
typedef vnl_matrix<ComplexType> VNLMatrixType;
typedef typename TOutput::ValueType OutputValueType;
itkStaticConstMacro(NumberOfComponentsPerPixel, unsigned int, 6);
inline void operator ()(TOutput & result, const TInput1& Shh, const TInput2& Shv, const TInput3& Svv)
{
const ComplexType S_hh = static_cast<ComplexType>(Shh);
......@@ -95,11 +93,6 @@ public:
result[5] = static_cast<OutputValueType>( res[2][2] );
}
unsigned int GetNumberOfComponentsPerPixel()
{
return NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the matrix
......@@ -111,11 +104,6 @@ public:
/** Destructor */
virtual ~SinclairToReciprocalCoherencyMatrixFunctor() {}
protected:
private:
};
} // namespace Functor
......
......@@ -89,11 +89,6 @@ public:
result[5] = static_cast<OutputValueType>( res[2][2] );
}
unsigned int GetNumberOfComponentsPerPixel()
{
return NumberOfComponentsPerPixel;
}
constexpr size_t OutputSize(...) const
{
// Size of the matrix
......@@ -105,14 +100,6 @@ public:
/** Destructor */
virtual ~SinclairToReciprocalCovarianceMatrixFunctor() {}
protected:
private:
//itkStaticConstMacro(NumberOfComponentsPerPixel, unsigned int, 6);
static const unsigned int NumberOfComponentsPerPixel = 6;
};
} // namespace Functor
......
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