17 #ifndef itkLocalStructureImageFilter_h
18 #define itkLocalStructureImageFilter_h
49 template<
typename TInput,
typename TOutput>
65 return !(*
this != other);
69 auto a1 =
static_cast<double>( A[0] );
70 auto a2 =
static_cast<double>( A[1] );
71 auto a3 =
static_cast<double>( A[2] );
73 double l1 = itk::Math::abs( a1 );
74 double l2 = itk::Math::abs( a2 );
75 double l3 = itk::Math::abs( a3 );
118 const double L3 = itk::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 + std::pow( ls / itk::Math::abs( lt ),
m_Gamma ) );
132 const double abslt = itk::Math::abs( lt );
133 if( ls > 0.0 && abslt /
m_Gamma > ls )
135 return std::pow( 1 -
m_Alpha * ls / itk::Math::abs( lt ),
m_Gamma );
141 if( ls < 0.0 && lt <= ls )
143 return std::pow( ( ls / lt ),
m_Gamma );
164 template <
typename TInputImage,
typename TOutputImage>
168 Function::LocalStructure< typename TInputImage::PixelType,
169 typename TOutputImage::PixelType> >
177 TInputImage,TOutputImage,
179 typename TInputImage::PixelType,
180 typename TOutputImage::PixelType> >;
194 this->GetFunctor().SetAlpha( value );
200 this->GetFunctor().SetGamma( value );
204 #ifdef ITK_USE_CONCEPT_CHECKING
void SetGamma(double value)
void SetAlpha(double value)
bool operator==(const LocalStructure &other) const
TOutput operator()(const TInput &A)
double WeightFunctionOmega(double ls, double lt) const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
~LocalStructureImageFilter() override
Base class for all process objects that output image data.
double WeightFunctionPhi(double ls, double lt) const
typename TInputImage::PixelType InputPixelType
LocalStructureImageFilter()
void SetGamma(double value)
static constexpr double eps
Implements pixel-wise generic operation on one image.
void SetAlpha(double value)
#define itkConceptMacro(name, concept)
Computes local similarity to geometrical structures using second derivative operations.
bool operator!=(const LocalStructure &) const