21 #ifndef otbGeodesicMorphologyLevelingFilter_h
22 #define otbGeodesicMorphologyLevelingFilter_h
30 namespace LevelingFunctor_tags
53 template <
class TInput,
class TInputMap,
class TOutput>
66 inline TOutput
operator()(
const TInput& pixel,
const TInputMap& convexPixel,
const TInputMap& concavePixel)
const
70 if (convexPixel > concavePixel)
72 result =
static_cast<TOutput
>(pixel - convexPixel);
74 else if (convexPixel < concavePixel)
76 result =
static_cast<TOutput
>(concavePixel + pixel);
80 result =
static_cast<TOutput
>(pixel);
99 template <
class TInputImage,
class TInputMaps,
class TOutputImage>
A generic functor filter templated by its functor.
This functor performs the pixel-wise leveling operation needed in the geodesic morphology decompositi...
virtual ~LevelingFunctor()
Destructor.
TOutput operator()(const TInput &pixel, const TInputMap &convexPixel, const TInputMap &concavePixel) const
LevelingFunctor()
Constructor.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.