Commit 79c5118d authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: finish polarimetric filters migration (ouf)

parent d0676c8f
......@@ -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
......
/*
* 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
......@@ -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
......@@ -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
......@@ -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>
......
......@@ -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
......@@ -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[])
......
......@@ -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[])
{
......
......@@ -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[])
......
......@@ -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[])
{
......
......@@ -25,8 +25,6 @@
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "otbPolarimetricFilters.h"
#include "otbMultiChannelExtractROI.h"
#include "otbSinclairToReciprocalCoherencyMatrixImageFilter.h"
......
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