19 #ifndef rtkSoftThresholdImageFilter_h 20 #define rtkSoftThresholdImageFilter_h 22 #include "itkUnaryFunctorImageFilter.h" 23 #include "itkConceptChecking.h" 24 #include "itkSimpleDataObjectDecorator.h" 43 template <
class TInput,
class TOutput>
68 return !(*
this != other);
74 return (itk::Math::sgn(A) * std::max((TInput)itk::Math::abs(A) - m_Threshold, (TInput)0.0));
82 template <
class TInputImage,
class TOutputImage>
84 :
public itk::UnaryFunctorImageFilter<
87 Functor::SoftThreshold<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
94 typedef itk::UnaryFunctorImageFilter<
120 itkConceptMacro(OutputEqualityComparableCheck, (itk::Concept::EqualityComparable<OutputPixelType>));
121 itkConceptMacro(InputPixelTypeComparable, (itk::Concept::Comparable<InputPixelType>));
122 itkConceptMacro(InputOStreamWritableCheck, (itk::Concept::OStreamWritable<InputPixelType>));
123 itkConceptMacro(OutputOStreamWritableCheck, (itk::Concept::OStreamWritable<OutputPixelType>));
134 #ifndef ITK_MANUAL_INSTANTIATION 135 # include "rtkSoftThresholdImageFilter.hxx" itk::SimpleDataObjectDecorator< InputPixelType > InputPixelObjectType
itk::SmartPointer< Self > Pointer
bool operator==(const SoftThreshold &other) const
bool operator!=(const SoftThreshold &other) const
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::PixelType InputPixelType
void SetThreshold(const TInput &thresh)
Soft thresholds an image.
itk::SmartPointer< const Self > ConstPointer
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::SoftThreshold< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
TOutput operator()(const TInput &A) const