17 #ifndef __itkLocalStructureImageFilter_h
18 #define __itkLocalStructureImageFilter_h
21 #include "vnl/vnl_math.h"
49 template<
class TInput,
class TOutput>
65 return !(*
this != other);
69 double a1 =
static_cast<double>( A[0] );
70 double a2 =
static_cast<double>( A[1] );
71 double a3 =
static_cast<double>( A[2] );
73 double l1 = vnl_math_abs( a1 );
74 double l2 = vnl_math_abs( a2 );
75 double l3 = vnl_math_abs( a3 );
113 if( l3 < vnl_math::eps )
118 const double L3 = vnl_math_abs( static_cast<double>( a3 ) );
122 const double sheetness = L3 * W * F;
124 return static_cast<TOutput
>( sheetness );
128 if( ls <= 0.0 && lt <= ls )
130 return ( 1 + vcl_pow( ls / vnl_math_abs( lt ),
m_Gamma ) );
132 const double abslt = vnl_math_abs( lt );
133 if( ls > 0.0 && abslt /
m_Gamma > ls )
141 if( ls < 0.0 && lt <= ls )
143 return vcl_pow( ( ls / lt ),
m_Gamma );
164 template <
class TInputImage,
class TOutputImage>
168 Function::LocalStructure< typename TInputImage::PixelType,
169 typename TOutputImage::PixelType> >
175 TInputImage,TOutputImage,
177 typename TInputImage::PixelType,
192 this->GetFunctor().SetAlpha( value );
198 this->GetFunctor().SetGamma( value );
202 #ifdef ITK_USE_CONCEPT_CHECKING
219 void operator=(
const Self&);
void SetGamma(double value)
void SetAlpha(double value)
bool operator==(const LocalStructure &other) const
TOutput operator()(const TInput &A)
TInputImage::PixelType InputPixelType
SmartPointer< const Self > ConstPointer
double WeightFunctionOmega(double ls, double lt) const
Base class for all process objects that output image data.
double WeightFunctionPhi(double ls, double lt) const
virtual ~LocalStructureImageFilter()
LocalStructureImageFilter()
void SetGamma(double value)
Implements pixel-wise generic operation on one image.
SmartPointer< Self > Pointer
void SetAlpha(double value)
#define itkConceptMacro(name, concept)
Computes local similarity to geometrical structures using second derivative operations.
UnaryFunctorImageFilter< TInputImage, TOutputImage, Function::LocalStructure< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
LocalStructureImageFilter Self
bool operator!=(const LocalStructure &) const