17 #ifndef itkDescoteauxSheetnessImageFilter_h
18 #define itkDescoteauxSheetnessImageFilter_h
42 template<
typename TInput,
typename TOutput>
60 return !(*
this != other);
64 double sheetness = 0.0;
66 auto a1 =
static_cast<double>( A[0] );
67 auto a2 =
static_cast<double>( A[1] );
68 auto a3 =
static_cast<double>( A[2] );
70 double l1 = itk::Math::abs( a1 );
71 double l2 = itk::Math::abs( a2 );
72 double l3 = itk::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 = itk::Math::abs( l3 + l3 - l2 - l1 ) / l3;
136 const double Rn = std::sqrt( l3*l3 + l2*l2 + l1*l1 );
138 sheetness = std::exp( - ( Rs * Rs ) / ( 2.0 *
m_Alpha *
m_Alpha ) );
139 sheetness *= ( 1.0 - std::exp( - ( Rb * Rb ) / ( 2.0 *
m_Gamma *
m_Gamma ) ) );
140 sheetness *= ( 1.0 - std::exp( - ( Rn * Rn ) / ( 2.0 *
m_C *
m_C ) ) );
142 return static_cast<TOutput
>( sheetness );
173 template <
typename TInputImage,
typename TOutputImage>
177 Function::Sheetness< typename TInputImage::PixelType,
178 typename TOutputImage::PixelType> >
186 TInputImage,TOutputImage,
188 typename TInputImage::PixelType,
189 typename TOutputImage::PixelType> >;
203 this->GetFunctor().SetAlpha( value );
209 this->GetFunctor().SetGamma( value );
215 this->GetFunctor().SetC( value );
219 this->GetFunctor().SetDetectBrightSheets( value );
223 this->GetFunctor().SetDetectDarkSheets( value );
227 #ifdef ITK_USE_CONCEPT_CHECKING
void SetDetectDarkSheets(bool value)
void SetBloobinessNormalization(double value)
bool m_DetectBrightSheets
void SetSheetnessNormalization(double value)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
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)
void SetDetectBrightSheets(bool value)
TOutput operator()(const TInput &A)
void SetGamma(double value)
void SetNoiseNormalization(double value)
static constexpr double eps
DescoteauxSheetnessImageFilter()
void SetDetectBrightSheets(bool value)
typename TInputImage::PixelType InputPixelType
Implements pixel-wise generic operation on one image.
bool operator==(const Sheetness &other) const
#define itkConceptMacro(name, concept)
bool operator!=(const Sheetness &) const
~DescoteauxSheetnessImageFilter() override