17 #ifndef itkDescoteauxSheetnessImageFilter_h
18 #define itkDescoteauxSheetnessImageFilter_h
21 #include "vnl/vnl_math.h"
42 template<
class TInput,
class TOutput>
60 return !(*
this != other);
64 double sheetness = 0.0;
66 double a1 =
static_cast<double>( A[0] );
67 double a2 =
static_cast<double>( A[1] );
68 double a3 =
static_cast<double>( A[2] );
70 double l1 = vnl_math_abs( a1 );
71 double l2 = vnl_math_abs( a2 );
72 double l3 = vnl_math_abs( a3 );
114 return static_cast<TOutput
>( sheetness );
121 return static_cast<TOutput
>( sheetness );
131 return static_cast<TOutput
>( sheetness );
134 const double Rs = l2 / l3;
135 const double Rb = vnl_math_abs( l3 + l3 - l2 - l1 ) / l3;
136 const double Rn = vcl_sqrt( l3*l3 + l2*l2 + l1*l1 );
138 sheetness = vcl_exp( - ( Rs * Rs ) / ( 2.0 *
m_Alpha *
m_Alpha ) );
139 sheetness *= ( 1.0 - vcl_exp( - ( Rb * Rb ) / ( 2.0 *
m_Gamma *
m_Gamma ) ) );
140 sheetness *= ( 1.0 - vcl_exp( - ( Rn * Rn ) / ( 2.0 *
m_C *
m_C ) ) );
142 return static_cast<TOutput
>( sheetness );
173 template <
class TInputImage,
class TOutputImage>
177 Function::Sheetness< typename TInputImage::PixelType,
178 typename TOutputImage::PixelType> >
184 TInputImage,TOutputImage,
186 typename TInputImage::PixelType,
201 this->GetFunctor().SetAlpha( value );
207 this->GetFunctor().SetGamma( value );
213 this->GetFunctor().SetC( value );
217 this->GetFunctor().SetDetectBrightSheets( value );
221 this->GetFunctor().SetDetectDarkSheets( value );
225 #ifdef ITK_USE_CONCEPT_CHECKING
242 void operator=(
const Self&);
void SetDetectDarkSheets(bool value)
UnaryFunctorImageFilter< TInputImage, TOutputImage, Function::Sheetness< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
SmartPointer< Self > Pointer
void SetBloobinessNormalization(double value)
bool m_DetectBrightSheets
void SetSheetnessNormalization(double value)
SmartPointer< const Self > ConstPointer
void SetDetectDarkSheets(bool value)
Base class for all process objects that output image data.
Computes a measure of Sheetness from the Hessian Eigenvalues.
void SetAlpha(double value)
TInputImage::PixelType InputPixelType
void SetDetectBrightSheets(bool value)
TOutput operator()(const TInput &A)
DescoteauxSheetnessImageFilter Self
void SetGamma(double value)
void SetNoiseNormalization(double value)
DescoteauxSheetnessImageFilter()
void SetDetectBrightSheets(bool value)
Implements pixel-wise generic operation on one image.
bool operator==(const Sheetness &other) const
static ITK_CONSTEXPR_VAR double eps
#define itkConceptMacro(name, concept)
virtual ~DescoteauxSheetnessImageFilter()
bool operator!=(const Sheetness &) const