17 #ifndef itkFrangiTubularnessImageFilter_h
18 #define itkFrangiTubularnessImageFilter_h
21 #include "vnl/vnl_math.h"
37 template<
class TInput,
class TOutput>
70 return !(*
this != other);
74 double tubularness = 0.0;
76 double a1 =
static_cast<double>( A[0] );
77 double a2 =
static_cast<double>( A[1] );
78 double a3 =
static_cast<double>( A[2] );
80 double l1 = vnl_math_abs( a1 );
81 double l2 = vnl_math_abs( a2 );
82 double l3 = vnl_math_abs( a3 );
144 const double Rs = l2 / l3;
145 const double Rb = l1 / vcl_sqrt( l2 * l3 );
146 const double Rn = vcl_sqrt( l3*l3 + l2*l2 + l1*l1 );
148 tubularness = ( 1.0 - vcl_exp( - ( Rs * Rs ) / ( 2.0 *
m_Alpha *
m_Alpha ) ) );
149 tubularness *= ( vcl_exp( - ( Rb * Rb ) / ( 2.0 *
m_Beta *
m_Beta ) ) );
150 tubularness *= ( 1.0 - vcl_exp( - ( Rn * Rn ) / ( 2.0 *
m_Gamma *
m_Gamma ) ) );
152 return static_cast<TOutput
>( tubularness );
169 std::cout <<
"m_BrigthForeground " << value << std::endl;
181 template <
class TInputImage,
class TOutputImage>
185 Function::Tubularness< typename TInputImage::PixelType,
186 typename TOutputImage::PixelType> >
192 TInputImage,TOutputImage,
194 typename TInputImage::PixelType,
209 this->GetFunctor().SetAlpha( value );
215 this->GetFunctor().SetBeta( value );
221 this->GetFunctor().SetGamma( value );
228 this->GetFunctor().SetBrightBackground( value );
232 #ifdef ITK_USE_CONCEPT_CHECKING
249 void operator=(
const Self&);
void SetGamma(double value)
UnaryFunctorImageFilter< TInputImage, TOutputImage, Function::Tubularness< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
bool operator==(const Tubularness &other) const
void SetNoiseNormalization(double value)
const Tubularness & operator=(const Tubularness &one)
FrangiTubularnessImageFilter Self
Base class for all process objects that output image data.
void SetSheetnessNormalization(double value)
void SetAlpha(double value)
SmartPointer< const Self > ConstPointer
bool operator!=(const Tubularness &) const
TOutput operator()(const TInput &A)
TInputImage::PixelType InputPixelType
FrangiTubularnessImageFilter()
Tubularness(const Tubularness &one)
Computes a measure of CrestLines from the Hessian Eigenvalues.
void SetBeta(double value)
virtual ~FrangiTubularnessImageFilter()
Implements pixel-wise generic operation on one image.
void SetBloobinessNormalization(double value)
void SetBrightBackground(bool value)
void SetBrightBackground(bool value)
SmartPointer< Self > Pointer
static ITK_CONSTEXPR_VAR double eps
#define itkConceptMacro(name, concept)