21 #ifndef otbHessianToScalarImageFilter_h
22 #define otbHessianToScalarImageFilter_h
24 #include "itkUnaryFunctorImageFilter.h"
38 template <
class TInput,
class TOutput>
56 det =
static_cast<TOutput
>(Hessian(0, 0) * Hessian(1, 1) - Hessian(0, 1) * Hessian(1, 0));
57 trace =
static_cast<TOutput
>(Hessian(0, 0) + Hessian(1, 1));
59 result = det - (
static_cast<TOutput
>(
m_Alpha) * trace * trace);
78 template <
class TInputImage,
class TOutputImage>
80 :
public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
81 Functor::HessianToScalar<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
86 typedef typename itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
97 this->GetFunctor().SetAlpha(Alpha);
102 return (this->GetFunctor().GetAlpha());
TOutput operator()(const TInput &Hessian)
double GetAlpha(void) const
void SetAlpha(double Alpha)
virtual ~HessianToScalar()
void operator=(const Self &)=delete
itk::SmartPointer< const Self > ConstPointer
~HessianToScalarImageFilter() override
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::HessianToScalar< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
HessianToScalarImageFilter()
double GetAlpha(void) const
void SetAlpha(double Alpha)
HessianToScalarImageFilter Self
HessianToScalarImageFilter(const Self &)=delete
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.